[CMake] segfault in makefile generator 3

Alexander Neundorf a.neundorf-work at gmx.net
Wed Jun 8 16:02:51 EDT 2005


Hi, 
 
if cmake is confronted with something like this: 
 
ADD_LIBRARY(konqueror_intern STATIC ${konqueror_intern_STAT_SRCS}) 
 
without konqueror_intern_STAT_SRCS being defined, cmake crashes :-/ 
Here's the bt: 
 
Program received signal SIGSEGV, Segmentation fault. 
0x40181593 in strlen () from /lib/libc.so.6 
(gdb) bt 
#0  0x40181593 in strlen () from /lib/libc.so.6 
#1  0x400a6dfd in std::string::operator+=(char const*) () 
from /usr/lib/libstdc++.so.5 
#2  0x081bb31c in 
cmLocalUnixMakefileGenerator3::WriteStaticLibraryRule(std::ostream&, char 
const*, cmTarget const&, std::vector<std::string, 
std::allocator<std::string> > const&, std::vector<std::string, 
std::allocator<std::string> > const&, std::vector<std::string, 
std::allocator<std::string> >&) 
    () 
#3  0x081b472a in 
cmLocalUnixMakefileGenerator3::WriteTargetRuleFiles(cmTarget const&) () 
#4  0x081b3184 in cmLocalUnixMakefileGenerator3::Generate() () 
#5  0x0818702b in cmGlobalGenerator::Generate() () 
#6  0x0818c069 in cmGlobalUnixMakefileGenerator3::Generate() () 
#7  0x0812b4fa in cmake::Generate() () 
#8  0x0812b2d0 in cmake::Run(std::vector<std::string, 
std::allocator<std::string> > const&, bool)() 
#9  0x080dad74 in do_cmake(int, char**) () 
#10 0x080da22f in main () 
#11 0x4011e916 in __libc_start_main () from /lib/libc.so.6 
(gdb)                                                           
 
In WriteStaticLibraryRule() targetLinkerLanguage() is added to a 
std::string, but in this case targetLinkerLanguage() returns 0 and so += 
crashes. 
Although the cmake syntax is not correct, still cmake shouldn't crash. 
 
Bye 
Alex 
 

-- 
Weitersagen: GMX DSL-Flatrates mit Tempo-Garantie!
Ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl


More information about the CMake mailing list