Search

Linker doesn't rebuild when stack reserve changed by VoiceOfExperience

Closed
as Fixed Help for as Fixed

1
0
Sign in
to vote
Type: Bug
ID: 711698
Opened: 12/5/2011 3:30:29 PM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
0
Workaround(s)
0
User(s) can reproduce this bug
When the stack reserve or commit value in the Linker is changed, the new values are not correctly built into the executable.

This is a bug also present in VS2010.
Details (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling version

Visual Studio 11 Developer Preview

Steps to reproduce

Create a new C++ project: MFC w/static library. See attached solution for details.
Build project; this will use defaults for stack.
Run executable; this should give a stack overflow error in chkstk.asm.
Increase stack reserve from default (blank=0) to 50000000.
Build project using F7.
Run executable, no error, which is correct.
Change stack reserve from 50M to 20000000.
Build project using F7.
Run executable, no error, which is wrong.
Rebuild project using rebuild from Build menu (i e, a complete rebuild).
Run executable; gives stack overflow error in chkstk.asm, which is correct.

It is convenient to monitor esp by setting a breakpoint on the app declaration. esp should be different each time stack allocation is changed in the Linker options.

Product Language

English

Operating System

Windows 7

Operating System Language

English

Actual results

No stack oflo when project built with inadequate stack.

Expected results

Stack oflo when project built with inadequate stack.
File Attachments
File Name Submitted By Submitted On File Size  
ReadMe.txt 12/5/2011 4 KB
StackTest.cpp 12/5/2011 2 KB
Sign in to post a comment.
Posted by Microsoft on 12/7/2011 at 10:17 AM
We have fixed the problem and the fix will be included in our next major release.

The workaround is to do "rebuild" (which would invoke a full linking) or use "editbin.exe" to directly modify the stack values in binary.

Thanks for taking the time to file the bug report. Please let us know if you have any other questions regarding this.

YongKang Zhu
--
VC++ CodeGen and Tools
Posted by MS-Moderator10 [Feedback Moderator] on 12/6/2011 at 1:48 AM
Thanks for your quick response. We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by VoiceOfExperience on 12/6/2011 at 12:39 AM
I have successfully uploaded a zip file containing the solution files using the procedure you gave.
Posted by MS-Moderator10 on 12/5/2011 at 6:39 PM
Hello,

You can use the following workspace to upload the files:
https://sftus.one.microsoft.com/choosetransfer.aspx?key=ae115d07-6f06-43f9-b73e-aa3e6598b94f
Password: 58oVCW*+@Q02Q

Please zip the file and use "FeedbackID-711698" as prefix of the file name.

Thank you.
Posted by VoiceOfExperience on 12/5/2011 at 5:42 PM
I have tried to attach the project files, but every time I submit, I get the error message "The following files were not successfully attached." I have reported this as a Connect bug.

Is there a way I can provide these files to Microsoft?
Posted by MS-Moderator01 on 12/5/2011 at 3:42 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.