Home Dashboard Directory Help
Search

C++ code generation never finishes (infinite loop) in c2.dll for some boost variant templates by Rajko Stojadinovic


Status: 

Closed
 as Fixed Help for as Fixed


1
0
Sign in
to vote
Type: Bug
ID: 797023
Opened: 8/10/2013 10:24:33 PM
Access Restriction: Public
0
Workaround(s)
view
1
User(s) can reproduce this bug

Description


Using some boost features like variants in this static library (boost 1.54). Visual Studio 2010 and 2013 preview both compile this project fine. However, on 2012, no matter if in XP toolset or not, it hangs on 'Generating Code...'. The hang happens either in cl.exe during compiling the static library in Debug mode, or in link.exe during linking my main executable with the static library in Release mode (because LTCG is enabled, the hang actually happens in the same place in c2.dll, just different exe is doing the code generation step)

While it's hung like this, the cl.exe or link.exe process is using 100% of a single core's CPU time, the memory usage remains the same (the working set is not increasing).
I attached to it while it was like this, and this is the call stack I got when i paused:
        c2.dll!Tuple::Unlink(class Tuple *) Unknown
        c2.dll!Tuple::MoveBefore(class Tuple *,class Tuple *) Unknown
        c2.dll!postprocess_CxxEH()     Unknown
        c2.dll!dop2_GetInitialTuples() Unknown
        c2.dll!ReadFunction() Unknown
        c2.dll!WorkerThreadMain()     Unknown
        c2.dll!ThreadPool::Thread::Main()     Unknown
        c2.dll!ThreadPool::Thread::ThreadMain(void *) Unknown
        msvcr110.dll!_callthreadstartex() Line 354     C
        msvcr110.dll!_threadstartex(void * ptd) Line 332        C
        kernel32.dll!@BaseThreadInitThunk@12\u001e() Unknown
        ntdll.dll!___RtlUserThreadStart@8\u001e()    Unknown
        ntdll.dll!__RtlUserThreadStart@8\u001e()     Unknown
If I pause, I either get this callstack, or one that's the same, except with 'InsertBefore' instead of 'MoveBefore'
So this project is currently uncompilable with visual studio 2012... have to either keep having 2010 installed just for it, or use 2013 preview which isn't very well supported by my external libraries...
Details
Sign in to post a comment.
Posted by Rajko Stojadinovic on 8/22/2013 at 2:01 AM
Yes it is blocking because boost won't have vs2013 support untill it's properly released and then some time after.
Is there a hotfix/workaround available for vs2012 ? Maybe i can change the code slightly so that the hang doesn't happen, I just don't know how.
Posted by Microsoft on 8/16/2013 at 8:30 PM
Hi Rajko,

Thank you for reporting this issue. The cause of the hang is a known bug in the compiler backend. As you have observed the bug has already been fixed in VS2013. Would it be possible for you to move to VS2013 ? Are you blocked by not having a it fixed in VS2012 ?

VC++ Compiler Team.
Posted by Rajko Stojadinovic on 8/11/2013 at 12:10 AM
I have attached a small-ish project that demonstrates the compile hang, it requires only vs2012 and boost 1.54 headers
Posted by Microsoft on 8/10/2013 at 10:52 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.
File Name Submitted By Submitted On File Size  
hangproject.zip 8/11/2013 8 KB