[cmake-developers] [CMake 0014005]: terminate called after throwing an instance of 'std::logic_error'

Mantis Bug Tracker mantis at public.kitware.com
Tue Mar 12 16:53:02 EDT 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=14005 
====================================================================== 
Reported By:                Alexander Polunin
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14005
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-03-12 16:53 EDT
Last Modified:              2013-03-12 16:53 EDT
====================================================================== 
Summary:                    terminate called after throwing an instance of
'std::logic_error'
Description: 
cmake source files contain places where you construct  std::basic_string from
NULL pointer of type const char*. And this leads to cmake termination after
throwing std::logic_error exception. Maybe it's not the big problem if you sure
that NULL pointers are impossible but at least in one case simple input to cmake
leads to its termination in string 
"cmake-2.8.10.2/Source/kwsys/SystemTools.cxx:1803".

kwsys_stl::string SystemTools::ConvertToUnixOutputPath(const char* path)
{
  kwsys_stl::string ret = path; // maybe we need to more strict check here
...................................

Steps to Reproduce: 
1) create CMakeLists.txt with content

################Begin##################
include (CTest)
project(ttt)
################End#####################

2) create build folder and go there
3) run cmake with default generator (I have checked it with gcc and MinGW
toolchain) 
 cmake ..

4) see 
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_S_construct null not valid
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-03-12 16:53 Alexander PoluninNew Issue                                    
======================================================================




More information about the cmake-developers mailing list