Search

Linker internal error/crash for x64 OpenMP by Sierwald Software GmbH

Closed
as Fixed Help for as Fixed

1
0
Sign in
to vote
Type: Bug
ID: 668324
Opened: 5/13/2011 2:28:38 AM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
0
Workaround(s)
0
User(s) can reproduce this bug
I use the
#pragma omp parallel for
for a loop and it makes the linker crash on x64. Linking for x32 works fine.

Sample project attached, in C, 84 lines of code.
Details (expand)

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

Visual Studio 2010 SP1

Steps to reproduce

Use the attached project. Make sure you're compiling for release x64 and have OpenMP enabled in the language options.

Product Language

English

Operating System

Windows 7

Operating System Language

English (US)

Actual results

1>------ Build started: Project: ompcrash, Configuration: Release x64 ------
1> Generating code
1>c:\users\joern\documents\visual studio 2010\projects\svneigenor\weatherradar\trunk\src\ompcrash\ompcrash.cpp(58): fatal error C1001: An internal error has occurred in the compiler.
1> (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c[0x5D4F993C:0x00000004]', line 183)
1> To work around this problem, try simplifying or changing the program near the locations listed above.
1> Please choose the Technical Support command on the Visual C++
1> Help menu, or open the Technical Support help file for more information
1>
1>LINK : fatal error LNK1000: Internal error during IMAGE::BuildImage

Expected results

Should link just fine.
x32 version links.

Note that the version I have sent as source doesn't run. I've truncated too much for it to still execute.
File Attachments
File Name Submitted By Submitted On File Size  
ompcrash.zip 5/13/2011 50 KB
Sign in to post a comment.
Posted by Microsoft on 6/24/2011 at 12:44 PM
Thanks for reporting this issue. I've verified that the compiler is incorrectly accessing a null pointer during comiplation of your test case. This issue will be fixed in a future release of Visual Studio.

You can work around this bug be disabling optimizations in the function that fails to compile or possibly by modifying your source slightly. The issue is related to the implicit converts in your loop between 32-bit integers and 64-bit pointers, so changing some of the loop variables to be 64-bits wide when targeting x64 may be a good work around for you. I was able to make the sample compile by changing "cycle" from type long (32-bits) to type "long long" (64-bits).

thanks,
ian Bearman
VC++ Code Generation and Optimization Team

Posted by MS-Moderator10 [Feedback Moderator] on 5/15/2011 at 9:18 PM
Thank you for submitting feedback on Visual Studio 2010 and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by MS-Moderator10 on 5/15/2011 at 6:34 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.