MantisBT - CMake
View Issue Details
0014545CMakeCMakepublic2013-11-04 22:242014-06-02 08:37
Orion Poplawski 
Brad King 
normalcrashhave not tried
closedfixed 
LinuxFedora19
CMake 2.8.12 
CMake 2.8.12.1CMake 2.8.12.1 
0014545: cmake crash
See https://bugzilla.redhat.com/show_bug.cgi?id=1026030 [^] for more info, but:

 /usr/bin/cmake -E cmake_automoc /home/strous/src/stellarium-0.12.4/plugins/Exoplanets/src/CMakeFiles/Exoplanets-static_automoc.dir/

led to:

Program terminated with signal 11, Segmentation fault.
#0 cmake::ExecuteCMakeCommand (args=std::vector of length 3, capacity 4 = {...}) at /usr/src/debug/cmake-2.8.12/Source/cmake.cxx:1740
1740 const char *config = args[3].empty() ? 0 : args[3].c_str();

Thread 1 (Thread 0x7f0a8ccef840 (LWP 10873)):
#0 cmake::ExecuteCMakeCommand (args=std::vector of length 3, capacity 4 = {...}) at /usr/src/debug/cmake-2.8.12/Source/cmake.cxx:1740
        automoc = {QtMajorVersion = "", Sources = "", Headers = "", IncludeProjectDirsBefore = false, Srcdir = "", Builddir = "", MocExecutable = "", MocCompileDefinitionsStr = "", MocIncludesStr = "", MocOptionsStr = "", ProjectBinaryDir = "", ProjectSourceDir = "", TargetName = "", CurrentCompileSettingsStr = "", OldCompileSettingsStr = "", OutMocCppFilename = "", MocIncludes = empty std::list, MocDefinitions = empty std::list, MocOptions = std::vector of length 0, capacity 0, Verbose = false, ColorOutput = true, RunMocFailed = false, GenerateAll = false, RelaxedMode = 124}
        config = <optimized out>
        automocSuccess = <optimized out>
#1 0x000000000048d6ec in do_cmake (ac=4, av=0x7fff0a364068) at /usr/src/debug/cmake-2.8.12/Source/cmakemain.cxx:513

Seems like it's testing if the argument is empty, but not if the argument exists at all first.
No tags attached.
Issue History
2013-11-04 22:24Orion PoplawskiNew Issue
2013-11-05 07:44Brad KingAssigned To => Brad King
2013-11-05 07:44Brad KingStatusnew => assigned
2013-11-05 07:44Brad KingTarget Version => CMake 2.8.12.1
2013-11-05 07:52Brad KingNote Added: 0034387
2013-11-05 08:22Brad KingStatusassigned => resolved
2013-11-05 08:22Brad KingResolutionopen => fixed
2013-11-05 08:22Brad KingFixed in Version => CMake 2.8.12.1
2014-06-02 08:37Robert MaynardNote Added: 0036004
2014-06-02 08:37Robert MaynardStatusresolved => closed

Notes
(0034387)
Brad King   
2013-11-05 07:52   
Fixed:

 cmake: Validate -E cmake_automoc argument count
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9ef66f2b [^]

and ported to post-2.8.12 development:

 cmake: Validate -E cmake_autogen argument count
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=132c40a8 [^]

FWIW, no one should be invoking "cmake -E cmake_automoc" by hand. It is an undocumented internal implementation detail of the AUTOMOC feature. The command-lines CMake generates do not trigger this crash.
(0036004)
Robert Maynard   
2014-06-02 08:37   
Closing resolved issues that have not been updated in more than 4 months.