MantisBT - CMake
View Issue Details
0016015CMakeCMakepublic2016-03-12 16:522016-06-10 14:21
Julian Schmidt 
Brad King 
lowtrivialalways
closedfixed 
x64CentOS6.7
CMake 3.5 
CMake 3.6CMake 3.6 
0016015: 'cmake -U*' causes SIGABRT in cmGlobalGenerator::EnableLanguage()
Doing 'cmake -U*' leads to a SIGABRT in cmGlobalGenerator::EnableLanguage() with the following message: "what(): basic_string::_S_construct NULL not valid".
At git tag "v3.5.0-rc3" do the following:

$ touch CMakeLists.txt
$ cmake .
[...]
$ cmake -U"*"
[...]
terminate called after throwing an instance of 'std::logic_error'
  what(): basic_string::_S_construct NULL not valid
Aborted (core dumped)
The reason for the SIGABRT is that in EnableLanguage() an std::string is constructed from a char null-pointer.

This can be reproduced also at git tag "v2.6.0".

Note that the general issue of construction of std::strings from null pointers in CMake has already been reported in 0014005. But the concrete example given (and fixed) there is different from the one here.
No tags attached.
Issue History
2016-03-12 16:52Julian SchmidtNew Issue
2016-03-14 10:51Brad KingNote Added: 0040674
2016-03-14 10:51Brad KingAssigned To => Brad King
2016-03-14 10:51Brad KingStatusnew => resolved
2016-03-14 10:51Brad KingResolutionopen => fixed
2016-03-14 10:51Brad KingFixed in Version => CMake 3.6
2016-03-14 10:51Brad KingTarget Version => CMake 3.6
2016-03-16 09:04Brad KingNote Edited: 0040674bug_revision_view_page.php?bugnote_id=40674#r2060
2016-06-10 14:21Kitware RobotNote Added: 0041226
2016-06-10 14:21Kitware RobotStatusresolved => closed

Notes
(0040674)
Brad King   
2016-03-14 10:51   
(edited on: 2016-03-16 09:04)
Thanks. This should fix it:

 Avoid depending on CMAKE_ROOT cache entry internally
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3144857e [^]

(0041226)
Kitware Robot   
2016-06-10 14:21   
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.