[Cmake] cmake seems to crash because 0x0 is used in place of ""

Wheeler, Fred (CRD) wheeler at crd.ge.com
Thu Jan 17 19:35:00 EST 2002


I'm getting cmake to core dump.  I hope this report helps.  My guess
is that def is being set to 0 in cmIfCommand.cxx, but that should be
interpreted as an empty string.  I can fix the problem in Solaris with
"export LD_PRELOAD=0 at 0.so.1" which puts an empty string \0 at memory
location 0x0 to solve such problems.

Below is some output from gdb.

Fred Wheeler

0% gdb $SR_CMAKE core
GNU gdb 5.1
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.7"...
Core was generated by `/no_backup/wheeler/prj/sr/cmake_usr/bin/cmake
/no_backup/wheeler/prj/sr/vxl_src'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /home/wheeler/usr/local/sparc-sun-solaris2.7/lib/libstdc++.so.3...done.
Loaded symbols for /home/wheeler/usr/local/sparc-sun-solaris2.7/lib/libstdc++.so.3
Reading symbols from /usr/lib/libm.so.1...done.
Loaded symbols for /usr/lib/libm.so.1
Reading symbols from /home/wheeler/usr/local/sparc-sun-solaris2.7/lib/libgcc_s.so.1...done.
Loaded symbols for /home/wheeler/usr/local/sparc-sun-solaris2.7/lib/libgcc_s.so.1
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /usr/lib/libdl.so.1...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/platform/SUNW,Sun-Blade-1000/lib/libc_psr.so.1...
done.
Loaded symbols for /usr/platform/SUNW,Sun-Blade-1000/lib/libc_psr.so.1
#0  0xff1ce5b0 in ?? ()
(gdb) where
#0  0xff1ce5b0 in ?? ()
#1  0x0005dcb8 in cmIfCommand::InitialPass(std::vector<std::string, std::allocator<std::string> >
const&) (this=0x1aa578, args=@0x19290c)
    at /no_backup/wheeler/prj/sr/cmake_src/Source/cmIfCommand.cxx:173
#2  0x00038a64 in cmMakefile::ExecuteCommand(std::string&, std::vector<std::string,
std::allocator<std::string> > const&) (this=0x19b948, name=@0x192908, 
    arguments=@0x19290c)
    at /no_backup/wheeler/prj/sr/cmake_src/Source/cmMakefile.cxx:238
#3  0x00038e94 in cmMakefile::ReadListFile(char const*, char const*) (
    this=0x19b948, 
    filename=0x175e1c "/no_backup/wheeler/prj/sr/vxl_src/CMakeLists.txt", 
    external=0x19290c "")
    at /no_backup/wheeler/prj/sr/cmake_src/Source/cmMakefile.cxx:350
#4  0x0005e4a0 in cmIncludeCommand::InitialPass(std::vector<std::string, std::allocator<std::string>
> const&) (this=0x1aa548, argsIn=@0xffbee2cc)
    at
/home/wheeler/usr/local/sparc-sun-solaris2.7/lib/gcc-lib/../../../include/g++-v3/bits/basic_string.h:
208
#5  0x00038a64 in cmMakefile::ExecuteCommand(std::string&, std::vector<std::string,
std::allocator<std::string> > const&) (this=0x19b948, name=@0x1a77b0, 
    arguments=@0x1a77b4)
    at /no_backup/wheeler/prj/sr/cmake_src/Source/cmMakefile.cxx:238
#6  0x00038e94 in cmMakefile::ReadListFile(char const*, char const*) (
    this=0x19b948, 
    filename=0x175dcc "/no_backup/wheeler/prj/sr/vxl_src/vxl/vul/io/tests/CMakeLists.txt",
external=0x1a77b4 "")
---Type <return> to continue, or q <return> to quit---
    at /no_backup/wheeler/prj/sr/cmake_src/Source/cmMakefile.cxx:350
#7  0x0003f480 in cmMakefile::FindSubDirectoryCMakeListsFiles(std::vector<cmMakefile*,
std::allocator<cmMakefile*> >&) (this=0x19a538, makefiles=@0xffbee788)
    at
/home/wheeler/usr/local/sparc-sun-solaris2.7/lib/gcc-lib/../../../include/g++-v3/bits/basic_string.h:
714
#8  0x0003f48c in cmMakefile::FindSubDirectoryCMakeListsFiles(std::vector<cmMakefile*,
std::allocator<cmMakefile*> >&) (this=0x199610, makefiles=@0xffbee788)
    at /no_backup/wheeler/prj/sr/cmake_src/Source/cmMakefile.cxx:1137
#9  0x0003f48c in cmMakefile::FindSubDirectoryCMakeListsFiles(std::vector<cmMakefile*,
std::allocator<cmMakefile*> >&) (this=0x1885d8, makefiles=@0xffbee788)
    at /no_backup/wheeler/prj/sr/cmake_src/Source/cmMakefile.cxx:1137
#10 0x0003f48c in cmMakefile::FindSubDirectoryCMakeListsFiles(std::vector<cmMakefile*,
std::allocator<cmMakefile*> >&) (this=0xffbeea20, makefiles=@0xffbee788)
    at /no_backup/wheeler/prj/sr/cmake_src/Source/cmMakefile.cxx:1137
#11 0x00092914 in cmUnixMakefileGenerator::RecursiveGenerateCacheOnly() (
    this=0x130238)
    at /no_backup/wheeler/prj/sr/cmake_src/Source/cmUnixMakefileGenerator.cxx:1333
#12 0x0008733c in cmUnixMakefileGenerator::GenerateMakefile() (this=0x130238)
    at /no_backup/wheeler/prj/sr/cmake_src/Source/cmUnixMakefileGenerator.cxx:115
#13 0x0003972c in cmMakefile::GenerateMakefile() (this=0xffbeea20)
    at /no_backup/wheeler/prj/sr/cmake_src/Source/cmMakefile.cxx:437
#14 0x00034060 in cmake::Generate(std::vector<std::string, std::allocator<std::string> > const&,
bool) (this=0xffbeebb8, args=@0xffbeebc0, buildMakefiles=true)
---Type <return> to continue, or q <return> to quit---
    at /no_backup/wheeler/prj/sr/cmake_src/Source/cmake.cxx:424
#15 0x00030f50 in main (ac=2, av=0xffbeec44)
    at /no_backup/wheeler/prj/sr/cmake_src/Source/cmakemain.cxx:23
(gdb) up
#1  0x0005dcb8 in cmIfCommand::InitialPass(std::vector<std::string, std::allocator<std::string> >
const&) (this=0x1aa578, args=@0x19290c)
    at /no_backup/wheeler/prj/sr/cmake_src/Source/cmIfCommand.cxx:173
173         if (!regEntry.find(def))
(gdb) print def
$1 = 0x0


--
Fred Wheeler, GE CRD, KWC-303
Phone: 518-387-7225 (GE Internal Dialcom: 8*833-7225)
Fax:   518-387-4042 (GE Internal Dialcom: 8*833-4042)



More information about the CMake mailing list