View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012647CMakeCMakepublic2012-01-02 05:132012-07-09 06:52
ReporterMicha Renner 
Assigned ToBrad King 
PriorityhighSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformWindows & LinuxOSWindows & LinuxOS Version
Product VersionCMake 2.8.7 
Target VersionCMake 2.8.8Fixed in VersionCMake 2.8.8 
Summary0012647: CMake287 - instabilities
DescriptionAs I mentioned here:
http://www.cmake.org/pipermail/cmake/2011-December/048261.html, [^]
the CMakeLists file, you can find in the appendix, lets crash CMake-gui in the generation run.

Now I can reproduce this also on a Linux machine.

It all works until the introduction of 287RC2.

So, lets hope for the best, that others can reproduce this error.
TagsNo tags attached.
Attached Filesgz file icon CMake287.tar.gz [^] (681 bytes) 2012-01-02 05:13
gz file icon ConfigFiles.tar.gz [^] (2,802 bytes) 2012-01-03 05:01
? file icon CMake-autobuild-v2.cmake [^] (3,338 bytes) 2012-01-03 08:36
? file icon TestSuite.tar.xz [^] (70,080 bytes) 2012-01-11 03:09
gz file icon CM287CrashMinimal.tar.gz [^] (425 bytes) 2012-01-11 10:12

 Relationships

  Notes
(0028085)
Eric NOULARD (developer)
2012-01-02 09:44

> Now I can reproduce this also on a Linux machine

I can't.

I tried to reproduce this on linux and didn't get any crash.

However I lack:
    PNGConfig.cmake
    png-config.cmake
and
    GLIBConfig.cmake
    glib-config.cmake

needed by
FIND_PACKAGE(PNG NO_MODULE)
FIND_PACKAGE(GLIB NO_MODULE)

this make cmake spit out warnings but I may generate makefile
and build the sample libraries without trouble.

How did you get a crash on Linux?
(0028086)
David Cole (manager)
2012-01-02 09:53

I cannot reproduce this either. (I also do not have PNG nor glib.)

I've tried it on Windows 7 x64, with the Visual Studio 10 generator.

Also on my Mac with Unix Makefiles.

I cannot seem to run our pre-built 32-bit cmake-gui on my x86_64 Linux box, so I will build that one from source as a 64-bit app and try again later.

Any clues about where the crash is?

Can you build a Debug build of cmake-gui and get a call stack when it crashes?
(0028087)
David Cole (manager)
2012-01-02 11:57

I installed the right libs to get our pre-built binary working on my Linux box... yet I still cannot reproduce this crash using your project.

I'm going to resolve this as not reproducible unless somebody else can repro it and/or give us the call stack to investigate possible problems in the source code.

More info within 48 hours, or I'll resolve as not repro until further evidence comes along.

Thanks.
(0028139)
Micha Renner (reporter)
2012-01-03 05:00

> How did you get a crash on Linux?
After configuration I hit the generation button.

> Any clues about where the crash is?
During the generation run

> Can you build a Debug build of cmake-gui and get a call stack when it
> crashes?
What do you mean? I always thought cmake-gui is a wrapper of cmake. Probably I was to unspecific. CMake crashes.
Building CMake on Windows has some open ends (0012523), but I try it in the next days.

To make things more transparent, I append the configfiles I use.

> I'm going to resolve this as not reproducible unless somebody else can
> repro it and/or give us the call stack to investigate possible
> problems in the source code.

I agree, but I must say, that about 1/3 of libraries (all you need to work with gtkmm-3.2 on Windows) I use, cannot be build anymore. Same on Linux. That was a running collection before 287rc2.

I would like to have the nightly builds of CMake for Windows (the program in binary form only) from Dec 9th to Dec 21st. May be the version
of Dec20 first, that would be a good startpoint.
(0028140)
Eric NOULARD (developer)
2012-01-03 07:59
edited on: 2012-01-03 08:42

>> How did you get a crash on Linux?
>After configuration I hit the generation button.

I am unable to reproduce this on Linux
(CMake 2.8.7 or git master) even with the provided config files.

> To make things more transparent, I append the configfiles I use.

However since all config files are using the NO_MODULE option
I still lack your config files for FFI and ZLIB
(and may be others referenced therein)

>> Any clues about where the crash is?
>During the generation run

Without recompiling cmake-gui could run it in a debugger or valgrind
and see what happen at crash time?

>> Can you build a Debug build of cmake-gui and get a call stack when it
>> crashes?
> What do you mean? I always thought cmake-gui is a wrapper of cmake.

cmake-gui is not calling CMake it is calling the CMakeLib (cmake library)
which is the same for cmake (command line) and cmake-gui (GUI).

Do you have the same crash when running command line "cmake"?

> I would like to have the nightly builds of CMake for Windows (the program in
> binary form only) from Dec 9th to Dec 21st. May be the version
> of Dec20 first, that would be a good startpoint.

May be this one:
http://www.cmake.org/files/dev/cmake-2.8.6.20111220-gd9367-win32-x86.exe [^]

see others there:
http://www.cmake.org/files/dev/ [^]

(0028141)
Eric NOULARD (developer)
2012-01-03 08:02

Hi Micha,

You said:

> Building CMake on Windows has some open ends (0012523), but I try it in the next days.

but you seem to have the same issue on Linux, right?
May be building a debug version on Linux would be easier for you?
(0028142)
Micha Renner (reporter)
2012-01-03 08:38

Hello Eric,

> Without recompiling cmake-gui could run it in a debugger or valgrind
> and see what happen at crash time?

This is an option

> Do you have the same crash when running command line "cmake"?
Yes, I tested it accidently on Windows

The links could be really helpful. This is what I wanted. Thanks.

So, I start with cmake-2.8.6.20111220-gd9367-win32-x86.exe and go back until the script works.
If this is not successful, I try the option above. If still not successful, I build CMake on Linux or Windows, but, in this case, I am not really optimistic.
(0028143)
Eric NOULARD (developer)
2012-01-03 08:40

Micha,

In order to ease the build of a debug version of CMake tools
I've just uploaded a cmake script file
https://public.kitware.com/Bug/file/4161/CMake-autobuild-v2.cmake [^]
which should to just that.

You may use it by doing:

mkdir tmp
cd tmp
cmake -P /path/to/CMake-autobuild-v2.cmake

this scripts should download source of CMake 2.8.7 and
build (using default build tool) CMake with QtDialog (a.k.a cmake-gui)
activated.

If all the needed libraries are installed and found
you should end-up with a tar.gz file which contains binary debug version
of the cmake tools (cmake, ccmake, cmake-gui etc...)
(0028154)
Micha Renner (reporter)
2012-01-04 04:46

I tested the nightly builds of CMake for Windows (Dec 9 until Dec 22)
Result:
cmake-2.8.6.20111213-g978ac-win32-x86.exe is the last working version

cmake-2.8.6.20111214-gdeb2c-win32-x86.exe is the first not working.


Finally, I could build cmake (2.8.7) on Windows. With a simple script it works, but not with the script I publicated here (same problems).
I let it run in the command window of Visual Studio.

Now I need help to run it with the debugger, F5 is the keyword. If I run it with F5 then CMake complains about not found dlls and not set enviroment variables. So what is the trick to run it with F5?
(0028159)
David Cole (manager)
2012-01-04 09:58

Given that the presumed breakage occurred between git commits 978ac and deb2c (extracted from the "g" portion of the nightly binary names), the following are the potential commits that cause this crash:

$ git log --oneline --no-merges 978ac..deb2c
1a17fdf Fix test on systems that do not have config directories.
feaf3b0 Revert "Follow only shared dependencies of shared library dependencies"
d302271 Follow only shared dependencies of shared library dependencies
5206960 Do not link private dependent shared libraries on OS X > 10.4
183b950 Follow all dependencies of shared library private dependencies
5720e1f HP: Drive shared library linking with compiler front end
4ed1769 KWSys Nightly Date Stamp
7ab1162 CMake: Fix progress reporting for custom targets (0012441)
6ddb1e5 Modules: Use "windres" as rc compiler base name for cross-compiles (0012480)

(I have not inspected them yet, but I will look at the diffs with gitk to see if any of them look suspicious...)
(0028160)
David Cole (manager)
2012-01-04 10:03
edited on: 2012-01-04 10:03

To run in the Visual Studio debugger, add the directory containing the Qt dlls to your path. You can either do it in VS itself, by right clicking the "cmake-gui" project, choosing "Properties", click on the "Debugging" list item, and then type "PATH=C:\Qt\bin" in the "Environment" field (with *your* path to the Qt bin dir)

Or, you can add the Qt directory to your PATH in a command prompt and launch VS from the command prompt so it inherits the PATH value just for one session.

(0028189)
Micha Renner (reporter)
2012-01-05 00:34

The last lines before dead. - It may rest in peace.


terminate called after throwing an instance of 'std::bad_alloc'
  what(): std::bad_alloc

Program received signal SIGABRT, Aborted.
0x00130416 in __kernel_vsyscall ()
#1 0x0026cc8f in raise () from /lib/i386-linux-gnu/libc.so.6
0000002 0x002702b5 in abort () from /lib/i386-linux-gnu/libc.so.6
0000003 0x001e74ed in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/i386-linux-gnu/libstdc++.so.6
0000004 0x001e5283 in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6
0000005 0x001e52bf in std::terminate() () from /usr/lib/i386-linux-gnu/libstdc++.so.6
0000006 0x001e540e in __cxa_throw () from /usr/lib/i386-linux-gnu/libstdc++.so.6
0000007 0x001e5a2f in operator new(unsigned int) () from /usr/lib/i386-linux-gnu/libstdc++.so.6
0000008 0x083dc348 in __gnu_cxx::new_allocator<cmGraphEdge>::allocate (this=0x8632ea8, __n=201326592) at /usr/include/c++/4.6/ext/new_allocator.h:92
#9 0x083d99b4 in std::_Vector_base<cmGraphEdge, std::allocator<cmGraphEdge> >::_M_allocate (this=0x8632ea8, __n=201326592) at /usr/include/c++/4.6/bits/stl_vector.h:150
0000010 0x083d6cd5 in std::vector<cmGraphEdge, std::allocator<cmGraphEdge> >::_M_insert_aux (this=0x8632ea8, __position=..., __x=...) at /usr/include/c++/4.6/bits/vector.tcc:324
#11 0x083d47af in std::vector<cmGraphEdge, std::allocator<cmGraphEdge> >::push_back (this=0x8632ea8, __x=...) at /usr/include/c++/4.6/bits/stl_vector.h:834
0000012 0x083d235c in cmComputeLinkDepends::HandleSharedDependency (this=0xbfffe3b8, dep=...) at /home/gildemeister/temp/cmake-2.8.7/Source/cmComputeLinkDepends.cxx:424
0000013 0x083d19e3 in cmComputeLinkDepends::Compute (this=0xbfffe3b8) at /home/gildemeister/temp/cmake-2.8.7/Source/cmComputeLinkDepends.cxx:238
0000014 0x08329d2a in cmComputeLinkInformation::Compute (this=0x8631fb8) at /home/gildemeister/temp/cmake-2.8.7/Source/cmComputeLinkInformation.cxx:500
0000015 0x0828baf6 in cmTarget::GetLinkInformation (this=0x8620fbc, config=0x21b9dc "") at /home/gildemeister/temp/cmake-2.8.7/Source/cmTarget.cxx:4662
0000016 0x083af03d in cmMakefileTargetGenerator::AppendTargetDepends (this=0x860e7a0, depends=...) at /home/gildemeister/temp/cmake-2.8.7/Source/cmMakefileTargetGenerator.cxx:1581
0000017 0x083af1a4 in cmMakefileTargetGenerator::AppendLinkDepends (this=0x860e7a0, depends=...) at /home/gildemeister/temp/cmake-2.8.7/Source/cmMakefileTargetGenerator.cxx:1608
0000018 0x083b7c9b in cmMakefileLibraryTargetGenerator::WriteLibraryRules (this=0x860e7a0, linkRuleVar=0x8627b34 "CMAKE_C_CREATE_SHARED_LIBRARY", extraFlags=0x860e9fc " ", relink=false) at /home/gildemeister/temp/cmake-2.8.7/Source/cmMakefileLibraryTargetGenerator.cxx:354
0000019 0x083b6e25 in cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules (this=0x860e7a0, relink=false) at /home/gildemeister/temp/cmake-2.8.7/Source/cmMakefileLibraryTargetGenerator.cxx:181
0000020 0x083b67d8 in cmMakefileLibraryTargetGenerator::WriteRuleFiles (this=0x860e7a0) at /home/gildemeister/temp/cmake-2.8.7/Source/cmMakefileLibraryTargetGenerator.cxx:89
0000021 0x08396615 in cmLocalUnixMakefileGenerator3::Generate (this=0x85e88b8) at /home/gildemeister/temp/cmake-2.8.7/Source/cmLocalUnixMakefileGenerator3.cxx:135
0000022 0x08362570 in cmGlobalGenerator::Generate (this=0x85e86b0) at /home/gildemeister/temp/cmake-2.8.7/Source/cmGlobalGenerator.cxx:964
0000023 0x083757a4 in cmGlobalUnixMakefileGenerator3::Generate (this=0x85e86b0) at /home/gildemeister/temp/cmake-2.8.7/Source/cmGlobalUnixMakefileGenerator3.cxx:88
0000024 0x082a68cf in cmake::Generate (this=0xbfffefbc) at /home/gildemeister/temp/cmake-2.8.7/Source/cmake.cxx:2521
0000025 0x082a6725 in cmake::Run (this=0xbfffefbc, args=..., noconfigure=false) at /home/gildemeister/temp/cmake-2.8.7/Source/cmake.cxx:2501
0000026 0x0821fc90 in do_cmake (ac=2, av=0xbffff324) at /home/gildemeister/temp/cmake-2.8.7/Source/cmakemain.cxx:528
0000027 0x0821f24a in main (ac=2, av=0xbffff324) at /home/gildemeister/temp/cmake-2.8.7/Source/cmakemain.cxx:338
Initial frame selected; you cannot go up. Thanks!
(0028190)
Micha Renner (reporter)
2012-01-05 00:46

> To run in the Visual Studio debugger, add the directory containing the Qt dlls
> to your path...
No, that is not the problem. Lets close this for a while.
I did it on Linux (See above). Maybe it helps you.
(0028193)
Eric NOULARD (developer)
2012-01-05 08:40

This seems wrong:
> _M_allocate (this=0x8632ea8, __n=201326592)

__n being the size (in byte) for the requested allocation this
request seems huge...

May be you could debug a little further in order to see
which values at the offending line:

> this->EntryConstraintGraph[dep.DependerIndex].push_back(index);

(your stack trace:
 0000012 0x083d235c in cmComputeLinkDepends::HandleSharedDependency (this=0xbfffe3b8, dep=...) at /home/gildemeister/temp/cmake-2.8.7/Source/cmComputeLinkDepends.cxx:424)

may be generating the error.

This commit did modifications in this area of the code:
183b950 Follow all dependencies of shared library private dependencies

I let David or Brad (who authored this commit) examine possible impacts.

As a small "blind" test
Micha, could you try to comment out this line:
cmComputeLinkDepend.c:433:
this->QueueSharedDependencies(index, iface->Libraries);

and see if you still get the crash.
(0028194)
David Cole (manager)
2012-01-05 11:03

Brad, looks like this commit:

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=183b950 [^]

has resulted in this crash report. Could you investigate further?
(0028196)
Micha Renner (reporter)
2012-01-05 11:38

> Micha, could you try to comment out this line:
> cmComputeLinkDepend.c:433:
> this->QueueSharedDependencies(index, iface->Libraries);

...then CMake terminates regular. No crash.
(0028197)
Eric NOULARD (developer)
2012-01-05 12:48

Thaks Micha,

Then I guess Brad now knows where to look at.

Micha,
If you're in the mood of (and have time for) more bug hunt
may be you can restore the offending line
and step-into it (with a debugger)
in order to better understand what happen.

I'm sure Brad will have a look at it but with no
runnable crashing test case on his side it may be
harder for him to find out.
(0028198)
Brad King (manager)
2012-01-05 14:10

I cannot reproduce this using the example posted to the mailing list either.

Can you remove the find_package dependencies and still reproduce it?
(0028222)
Micha Renner (reporter)
2012-01-10 04:17

> Can you remove the find_package dependencies and still reproduce it?
No.

You need the autogenerated GLIB files (png is not important) (GLIBExport, GLIBExport-debug etc. ). Meld reported, that their structure has changed RC1 -> RC2. So I thought that was the point, but it wasn't.

My proposal for a fast solution (10 min for you):
You use my CMake scripts (70kB), read the ReadMe.txt file first, download the source of zlib-1.2.5, libffi-3.0.10 and glib-2.3.0 (exact these versions), build and install the libraries.

Now try to run the script in CMake287Crash. -> It should not work.

The scripts are tested with Fedora16 and Ubuntu 10.11.
(0028240)
Brad King (manager)
2012-01-10 13:51

> You use my CMake scripts (70kB), read the ReadMe.txt file first

Where are these?
(0028252)
Micha Renner (reporter)
2012-01-11 03:06

> If you're in the mood of (and have time for) more bug hunt
> may be you can restore the offending line
> and step-into it (with a debugger)

Please, see below

$1 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x860cb84 "MiG_gio-2.0"}}

DependerIndex = 0
index = 4

$2 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x861e1e4 "rot"}}

DependerIndex = 0
index = 5

$3 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x8610334 "MiG_glib-2.0"}}

DependerIndex = 5
index = 6

$4 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x861f9ec "MiG_gobject-2.0"}}

DependerIndex = 4
index = 7

$5 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x8617e7c "MiG_gmodule-2.0"}}

DependerIndex = 4
index = 8

$6 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x861c6fc "MiG_inotify"}}

DependerIndex = 4
index = 9

$7 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x8615eec "/usr/lib/i386-linux-gnu/libdl.so"}}

DependerIndex = 4
index = 10

$8 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x861c71c "MiG_asyncns"}}
DependerIndex = 4
index = 11

$9 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x8611744 "MiG_zlib"}}
DependerIndex = 4
index = 12

$10 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x8611764 "MiG_xdgmime"}}
DependerIndex = 4
index = 12

$11 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x8609f4c "MiG_glib-2.0"}}
DependerIndex = 4
index = 6

$12 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x861622c "MiG_glib-2.0"}}
DependerIndex = 7
index = 6

$13 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x861624c "MiG_gthread-2.0"}}
DependerIndex = 7
index = 13

$14 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x8627bdc "MiG_ffi-3.0"}}
DependerIndex = 7
index = 14

$15 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x86142ac "MiG_glib-2.0"}}
DependerIndex = 7
index = 6

$16 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x861a0d4 "/usr/lib/i386-linux-gnu/libdl.so"}}
DependerIndex = 8
index = 10

$17 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x861bb2c "/usr/lib/i386-linux-gnu/libresolv.so"}}
DependerIndex = 11
index = 15

$18 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x8609f4c "MiG_glib-2.0"}}
DependerIndex = 6
index = 6

$19 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x8609f4c "MiG_glib-2.0"}}
DependerIndex = 6
index = 6

$20 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x860b4a4 "/usr/lib/i386-linux-gnu/libpthread.so"}}
DependerIndex = 13
index = 16

$21 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x86103ac "/usr/lib/i386-linux-gnu/librt.so"}}
DependerIndex = 13
index = 17

$22 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x86234e4 "MiG_glib-2.0"}}
DependerIndex = 13
index = 6

$23 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x8609f4c "MiG_glib-2.0"}}
DependerIndex = 6
index = 6

$24 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x8609f4c "MiG_glib-2.0"}}
DependerIndex = 6
index = 6

$25 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x8609f4c "MiG_glib-2.0"}}
DependerIndex = 6
index = 6

$26 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x8609f4c "MiG_glib-2.0"}}
DependerIndex = 6
index = 6

$27 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x8609f4c "MiG_glib-2.0"}}
DependerIndex = 6
index = 6

$28 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x8609f4c "MiG_glib-2.0"}}
DependerIndex = 6
index = 6

$29 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x8609f4c "MiG_glib-2.0"}}
DependerIndex = 6
index = 6

$30 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x8609f4c "MiG_glib-2.0"}}
DependerIndex = 6
index = 6

...

I stopped here.
(0028253)
Micha Renner (reporter)
2012-01-11 03:11

> Where are these?
Please, see TestSuite.tar.xy
(0028267)
Brad King (manager)
2012-01-11 10:15

Thanks, I was able to reproduce it. I stripped it down to a very minimal example, attached as "CM287CrashMinimal.tar.gz". Here is the CMake code from it:


CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7)
PROJECT(CM287Crash C)

ADD_LIBRARY(A SHARED IMPORTED)
SET_TARGET_PROPERTIES(A PROPERTIES
  IMPORTED_LINK_INTERFACE_LIBRARIES "A"
  IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/libA.so"
  )

ADD_LIBRARY(B SHARED lib.c)
SET_TARGET_PROPERTIES(B PROPERTIES
  LINK_INTERFACE_LIBRARIES B
  )
TARGET_LINK_LIBRARIES(B A)

ADD_EXECUTABLE(main main.c)
TARGET_LINK_LIBRARIES(main B)


The crash is because CMake fills up memory following an infinite dependency loop since the libraries list themselves in their own link interface. I will look at fixing CMake to tolerate this case without crashing.

Meanwhile, there is no reason for a library to be listed in its own link interface. You can fix your projects by removing that from all the shared libraries in all the packages.
(0028280)
Brad King (manager)
2012-01-12 10:34

Fixed and test case added:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9cc19b2d [^]

Thanks for your help with reproducing the problem.
(0028294)
Brad King (manager)
2012-01-13 14:26

I rebased the original fix. Now it is:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8e756d2b [^]
(0029954)
David Cole (manager)
2012-07-09 06:52

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2012-01-02 05:13 Micha Renner New Issue
2012-01-02 05:13 Micha Renner File Added: CMake287.tar.gz
2012-01-02 09:13 David Cole Assigned To => David Cole
2012-01-02 09:13 David Cole Status new => assigned
2012-01-02 09:44 Eric NOULARD Note Added: 0028085
2012-01-02 09:53 David Cole Note Added: 0028086
2012-01-02 11:57 David Cole Note Added: 0028087
2012-01-02 12:01 David Cole Target Version => CMake 2.8.8
2012-01-03 05:00 Micha Renner Note Added: 0028139
2012-01-03 05:01 Micha Renner File Added: ConfigFiles.tar.gz
2012-01-03 07:59 Eric NOULARD Note Added: 0028140
2012-01-03 08:02 Eric NOULARD Note Added: 0028141
2012-01-03 08:36 Eric NOULARD File Added: CMake-autobuild-v2.cmake
2012-01-03 08:38 Micha Renner Note Added: 0028142
2012-01-03 08:40 Eric NOULARD Note Added: 0028143
2012-01-03 08:42 Eric NOULARD Note Edited: 0028140
2012-01-04 04:46 Micha Renner Note Added: 0028154
2012-01-04 09:58 David Cole Note Added: 0028159
2012-01-04 10:03 David Cole Note Added: 0028160
2012-01-04 10:03 David Cole Note Edited: 0028160
2012-01-05 00:34 Micha Renner Note Added: 0028189
2012-01-05 00:46 Micha Renner Note Added: 0028190
2012-01-05 08:40 Eric NOULARD Note Added: 0028193
2012-01-05 11:02 David Cole Assigned To David Cole => Brad King
2012-01-05 11:03 David Cole Note Added: 0028194
2012-01-05 11:38 Micha Renner Note Added: 0028196
2012-01-05 12:48 Eric NOULARD Note Added: 0028197
2012-01-05 14:10 Brad King Note Added: 0028198
2012-01-10 04:17 Micha Renner Note Added: 0028222
2012-01-10 13:51 Brad King Note Added: 0028240
2012-01-11 03:06 Micha Renner Note Added: 0028252
2012-01-11 03:09 Micha Renner File Added: TestSuite.tar.xz
2012-01-11 03:11 Micha Renner Note Added: 0028253
2012-01-11 10:12 Brad King File Added: CM287CrashMinimal.tar.gz
2012-01-11 10:15 Brad King Note Added: 0028267
2012-01-12 10:34 Brad King Note Added: 0028280
2012-01-12 10:34 Brad King Status assigned => resolved
2012-01-12 10:34 Brad King Fixed in Version => CMake 2.8.8
2012-01-12 10:34 Brad King Resolution open => fixed
2012-01-13 14:26 Brad King Status resolved => feedback
2012-01-13 14:26 Brad King Resolution fixed => reopened
2012-01-13 14:26 Brad King Note Added: 0028294
2012-01-13 14:26 Brad King Status feedback => resolved
2012-01-13 14:26 Brad King Resolution reopened => fixed
2012-07-09 06:52 David Cole Note Added: 0029954
2012-07-09 06:52 David Cole Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team