[CMake] segfault in makefile generator 3
Ken Martin
ken.martin at kitware.com
Wed Jun 8 16:41:19 EDT 2005
I fixed the segfault and modified ADD_LIBRARY and ADD_EXECUTABLE to error if
called with no arguments. I'll look into the include issue although my first
test did not reproduce the problem.
Ken
> -----Original Message-----
> From: cmake-bounces+ken.martin=kitware.com at cmake.org [mailto:cmake-
> bounces+ken.martin=kitware.com at cmake.org] On Behalf Of Alexander Neundorf
> Sent: Wednesday, June 08, 2005 3:03 PM
> To: cmake at www.cmake.org
> Subject: [CMake] segfault in makefile generator 3
>
> 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
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
More information about the CMake
mailing list