Search

VS2010: x64 compiler optimization bug (crash) by poiru

Closed
as Fixed Help for as Fixed

1
0
Sign in
to vote
Type: Bug
ID: 657966
Opened: 4/7/2011 7:27:51 AM
Access Restriction: Public
0
Workaround(s)
1
User(s) can reproduce this bug
There is a bug in the VC2010 x64 compiler that crashes our x64 project built with "Inline Function Expansion" set to "Only __inline (/Ob1)".

Win32\Release works fine with and without "Only __inline (/Ob1)" optimization. x64\Release works fine when "Inline Function Expansion" is set to "Default".

We're have:
- Visual C++ 2010 Express Edition with SP1 (note: this bug was present already on VS2010 w/o SP1)
- Windows 7.1 SDK (for the x64 compiler)
- KB2519277 hotfix
Details (expand)

Visual Studio/Silverlight/Tooling version

Visual Studio 2010 SP1

What category (if any) best represents this feedback?

Reliability

Steps to reproduce

1) Download and extract: http://poiru.net/rainmetersrc.zip
2) Open Rainmeter.sln, select Release\x64, and build solution
3) Open TestBench\x64\Release\Rainmeter.exe (or simply press F5)

This will cause a crash.

Now select the 'Library' project -> Properties -> Configuration Properties -> C/C++ -> Optimization. There, change "Inline Function Expansion" to Default. Build solution and repeat step 3. Now everything works fine.

Product Language

English

Operating System

Windows 7

Operating System Language

English

Actual results

Crash.

Expected results

A black window with the text "Rainmeter Test".
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 7/11/2011 at 11:29 AM
Hi, sorry for not responding back sooner.

This issue will be fixed in the next release of Visual Studio.

The bug occurs when optimizing the function “removeentry” (in lgc.c)

If you need a workaround, you can use “#pragma optimize” to disable optimizations for that function. As in:

#pragma optimize( "", off )

static void removeentry (Node *n) {
...
}

#pragma optimize( "", on )
Posted by poiru on 4/30/2011 at 8:16 AM
Any updates on this matter?
Posted by Microsoft on 4/8/2011 at 12:48 AM
Thanks for your feedback.

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 Microsoft on 4/7/2011 at 8:14 AM
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.