MantisBT - CMake
View Issue Details
0012517CMakeCTestpublic2011-10-14 04:542012-03-06 08:37
bmn 
David Cole 
highcrashalways
closedfixed 
WindowsXP x64
CMake 2.8.6 
 
0012517: CTest crash
I have a perfectly reproducible crash on my setup.
Run "ctest -S script.cmake" with the following script:

ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}")
Unhandled exception at 0x005da0c5 in ctest.exe: 0xC0000005: Access violation reading location 0x00000000.

Disassembly of nearby code:

005DA0BB int 3
005DA0BC int 3
005DA0BD int 3
005DA0BE int 3
005DA0BF int 3
005DA0C0 push edi
005DA0C1 mov edi,dword ptr [esp+8]
005DA0C5 mov cl,byte ptr [edi]
005DA0C7 cmp cl,2Fh
005DA0CA jne 005DA0D1
005DA0CC cmp byte ptr [edi+1],cl
005DA0CF je 005DA0DB
005DA0D1 cmp cl,5Ch
005DA0D4 jne 005DA0F3
005DA0D6 cmp byte ptr [edi+1],cl
005DA0D9 jne 005DA0F3
005DA0DB mov ecx,dword ptr [esp+0Ch]
005DA0DF test ecx,ecx
005DA0E1 je 005DA0EE
005DA0E3 push 675558h
005DA0E8 call dword ptr ds:[657280h]
005DA0EE lea eax,[edi+2]
005DA0F1 pop edi
005DA0F2 ret
005DA0F3 cmp cl,2Fh
005DA0F6 je 005DA1F1

Call stack:
> ctest.exe!005da0c5()
     [Frames below may be incorrect and/or missing, no symbols loaded for ctest.exe]
     ctest.exe!005dc978()
     ctest.exe!005dd5d3()
     ctest.exe!005c0073()
     kernel32.dll!7d4dee14()
     kernel32.dll!7d4decef()
     kernel32.dll!7d4ded02()
     ctest.exe!005c005a()
     ctest.exe!005dd7ad()
     msvcp90.dll!78484f2a()
     msvcp90.dll!7848522b()
     msvcp90.dll!784859be()
     msvcp90.dll!78486396()
     msvcp90.dll!78485ead()
     ctest.exe!004984f9()
     ctest.exe!004146f4()
     ctest.exe!00495a78()
     msvcp90.dll!78484f2a()
     msvcp90.dll!7848beba()
     msvcp90.dll!784863a1()
     msvcr90.dll!78583c1b()
     msvcr90.dll!78543600()
     ctest.exe!00624a62()
     ctest.exe!00624c4c()
     kernel32.dll!7d4e7d42()

EAX = 00000000 EBX = 00000000 ECX = 010AE538 EDX = 010AE534 ESI = 00000000 EDI = 00000000
EIP = 005DA0C5 ESP = 010AE4CC EBP = 03349978 EFL = 00010202
No tags attached.
Issue History
2011-10-14 04:54bmnNew Issue
2011-10-14 05:11bmnNote Added: 0027584
2011-10-14 07:44David ColeAssigned To => David Cole
2011-10-14 07:44David ColeStatusnew => assigned
2011-10-14 07:48David ColeNote Added: 0027585
2011-10-14 07:48David ColeStatusassigned => resolved
2011-10-14 07:48David ColeResolutionopen => fixed
2011-10-14 07:50David ColeNote Added: 0027586
2012-03-06 08:37David ColeNote Added: 0028823
2012-03-06 08:37David ColeStatusresolved => closed

Notes
(0027584)
bmn   
2011-10-14 05:11   
Actually it crashes with any script that I try.
(0027585)
David Cole   
2011-10-14 07:48   
Fix pushed to 'next' with this commit:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7041cd6a884d96941af0ac7aad442a83618aff71 [^]
(0027586)
David Cole   
2011-10-14 07:50   
I fixed the crash, but the example script is fairly useless on its own.

At a minimum, in a ctest -S script, you are expected to define the variables:
  CTEST_SOURCE_DIRECTORY
  CTEST_BINARY_DIRECTORY
  CTEST_CMAKE_GENERATOR

...or, alternatively, to pass them in as arguments to any functions that need them.

We should probably have better documentation of ctest -S scripts available... separate issue. :-)
(0028823)
David Cole   
2012-03-06 08:37   
Closing resolved issues that have not been updated in more than 4 months.