View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0013178 | CMake | CMake | public | 2012-05-01 03:51 | 2012-05-01 06:24 | ||||
Reporter | cjd | ||||||||
Assigned To | Eric NOULARD | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | no change required | ||||||
Platform | amd64 | OS | Linux debo8 3.2.0-1-amd64 | OS Version | |||||
Product Version | CMake 2.8.4 | ||||||||
Target Version | Fixed in Version | CMake 2.8.6 | |||||||
Summary | 0013178: Segfault, always reproducible but no idea why. | ||||||||
Description | user@debo8:~/wrk/play/mygit/nacl/build$ gdb cmake -ex 'r ..' GNU gdb (GDB) 7.3-debian Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> [^] This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... [^] Reading symbols from /usr/local/bin/cmake...done. Starting program: /usr/local/bin/cmake .. -- Loaded CMakeASM-ATTInformation - ASM-ATT support is still experimental, please report issues crypto_verify --- 32 --- ref crypto_verify --- 16 --- ref crypto_core --- hsalsa20 --- ref2 crypto_core --- hsalsa20 --- ref crypto_core --- salsa208 --- ref crypto_core --- salsa20 --- ref crypto_core --- salsa2012 --- ref crypto_hashblocks --- sha256 --- inplace crypto_hashblocks --- sha256 --- ref crypto_hashblocks --- sha512 --- inplace crypto_hashblocks --- sha512 --- ref crypto_hash --- sha256 --- ref crypto_hash --- sha512 --- ref crypto_stream --- salsa208 --- x86_xmm5 crypto_stream --- salsa208 --- ref crypto_stream --- salsa208 --- amd64_xmm6 crypto_stream --- salsa20 --- x86_xmm5 crypto_stream --- salsa20 --- ref crypto_stream --- salsa20 --- amd64_xmm6 crypto_stream --- aes128ctr --- portable crypto_stream --- aes128ctr --- core2 crypto_stream --- salsa2012 --- x86_xmm5 crypto_stream --- salsa2012 --- ref crypto_stream --- salsa2012 --- amd64_xmm6 crypto_stream --- xsalsa20 --- ref crypto_onetimeauth --- poly1305 --- amd64 crypto_onetimeauth --- poly1305 --- x86 crypto_onetimeauth --- poly1305 --- 53 crypto_onetimeauth --- poly1305 --- ref crypto_auth --- hmacsha512256 --- ref crypto_auth --- hmacsha256 --- ref crypto_secretbox --- xsalsa20poly1305 --- ref crypto_scalarmult --- curve25519 --- donna_c64 crypto_scalarmult --- curve25519 --- ref crypto_scalarmult --- curve25519 --- athlon crypto_box --- curve25519xsalsa20poly1305 --- ref crypto_sign --- edwards25519sha512batch --- ref -- Tests to run for nacl/tests stream_test core6_test core3_test scalarmult_test stream3_test stream2_test core1_test_hsalsa20 core1_test_salsa208 core1_test_salsa20 core1_test_salsa2012 hash3_test auth3_test_hmacsha512256 auth3_test_hmacsha256 box8_test_curve25519xsalsa20poly1305 secretbox2_test box_test onetimeauth_test scalarmult6_test auth5_test_hmacsha512256 auth5_test_hmacsha256 auth_test_hmacsha512256 auth_test_hmacsha256 scalarmult2_test secretbox7_test_xsalsa20poly1305 secretbox_test onetimeauth2_test box2_test hash_test scalarmult5_test auth2_test_hmacsha512256 auth2_test_hmacsha256 core5_test_hsalsa20 core5_test_salsa208 core5_test_salsa20 core5_test_salsa2012 onetimeauth7_test box7_test_curve25519xsalsa20poly1305 secretbox8_test_xsalsa20poly1305 core4_test core2_test_hsalsa20 core2_test_salsa208 core2_test_salsa20 core2_test_salsa2012 stream4_test -- Configuring done Program received signal SIGSEGV, Segmentation fault. 0x00000000005e91c0 in cmTarget::IsImported() const () (gdb) backtrace #0 0x00000000005e91c0 in cmTarget::IsImported() const () #1 0x00000000007ca8f8 in cmComputeTargetDepends::AddTargetDepend(int, cmTarget*, bool) () 0000002 0x00000000007ca969 in cmComputeTargetDepends::AddTargetDepend(int, cmTarget*, bool) () 0000003 0x00000000007cab1c in cmComputeTargetDepends::AddTargetDepend(int, char const*, bool) () 0000004 0x00000000007cacb7 in cmComputeTargetDepends::CollectTargetDepends(int) () 0000005 0x00000000007cafa1 in cmComputeTargetDepends::CollectDepends() () 0000006 0x00000000007cb0e5 in cmComputeTargetDepends::Compute() () 0000007 0x000000000073fd7a in cmGlobalGenerator::ComputeTargetDepends() () 0000008 0x00000000007400e0 in cmGlobalGenerator::Generate() () #9 0x00000000007583dd in cmGlobalUnixMakefileGenerator3::Generate() () 0000010 0x000000000064da93 in cmake::Generate() () #11 0x000000000065affc in cmake::Run(std::vector<std::string, std::allocator<std::string> > const&, bool) () 0000012 0x00000000005add8c in do_cmake(int, char**) () 0000013 0x00000000005ae0d9 in main () (gdb) | ||||||||
Steps To Reproduce | git clone git://github.com/cjdelisle/nacl.git [^] cd nacl git checkout nacl-fault mkdir build cd build cmake .. | ||||||||
Additional Information | Sorry this is about the worst imaginable test case. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0029374) cjd (reporter) 2012-05-01 03:57 |
This was the straw that broke the camel's back: https://github.com/cjdelisle/nacl/blob/cmake-fault/CMakeLists.txt#L50 [^] Added because I was trying to understand why /tests/CMakeLists.txt was failing to pull in the randombytes library. |
(0029375) cjd (reporter) 2012-05-01 05:37 |
After playing with the code a bit, I was able to isolate the problem much better. 2 imported libraries, one in the main directory and one in a subdirectory. An executable in another subdirectory which depends on the one in the main directory. If that main dir library depends on the other subdir library, cmake will segfault when generating. main dir: https://github.com/cjdelisle/nacl/blob/cmake-fault/CMakeLists.txt [^] subdir library: https://github.com/cjdelisle/nacl/blob/cmake-fault/randombytes/CMakeLists.txt [^] subdir executable: https://github.com/cjdelisle/nacl/blob/cmake-fault/tests/CMakeLists.txt [^] A likely related issue is if the executable depends on both the main dir library and the subdir library, it cannot find the subdir library even though depending on either one alone works ok. |
(0029376) Eric NOULARD (developer) 2012-05-01 05:49 edited on: 2012-05-01 05:56 |
Could you try with CMake 2.8.8? I tried myself with 2.8.8 and didn't get any error. I remember there has been some crash fix w.r.t. to some import lib scheme but I can't remember the bug number. |
(0029377) Eric NOULARD (developer) 2012-05-01 06:00 |
I did not find the bug report but the commit I was thinking of was: commit 8ee9bbbd0ca5aab5bceb2dc9dda041e5745ffc19 Author: Brad King <brad.king@kitware.com> Date: Thu Aug 4 15:35:59 2011 -0400 Do not crash when an imported target depends on a missing target Commit e01cce28 (Allow add_dependencies() on imported targets, 2010-11-19) forgot to check if the dependee exists before using it. This commit has been merged since 2.8.6. Your crash may be related to this since: CMakeLists.txt:add_library(nacl STATIC IMPORTED) randombytes/CMakeLists.txt:add_library(randombytes STATIC IMPORTED) and CMakeLists.txt:add_dependencies(nacl randombytes) |
(0029378) cjd (reporter) 2012-05-01 06:09 |
Thanks for looking in to it. user@debo8:~/wrk/play/mygit/nacl/build$ cmake .. -- Configuring done Segmentation fault user@debo8:~/wrk/play/mygit/nacl/build$ ~/src/cmake-2.8.8/build/bin/cmake .. -- Configuring done -- Generating done -- Build files have been written to: /home/user/wrk/play/mygit/nacl/build user@debo8:~/wrk/play/mygit/nacl/build$ |
(0029379) Eric NOULARD (developer) 2012-05-01 06:24 |
This issue was probably already fixed in 2.8.6. See previous comment. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2012-05-01 03:51 | cjd | New Issue | |
2012-05-01 03:57 | cjd | Note Added: 0029374 | |
2012-05-01 05:37 | cjd | Note Added: 0029375 | |
2012-05-01 05:49 | Eric NOULARD | Note Added: 0029376 | |
2012-05-01 05:56 | Eric NOULARD | Note Edited: 0029376 | |
2012-05-01 06:00 | Eric NOULARD | Note Added: 0029377 | |
2012-05-01 06:09 | cjd | Note Added: 0029378 | |
2012-05-01 06:24 | Eric NOULARD | Note Added: 0029379 | |
2012-05-01 06:24 | Eric NOULARD | Status | new => closed |
2012-05-01 06:24 | Eric NOULARD | Assigned To | => Eric NOULARD |
2012-05-01 06:24 | Eric NOULARD | Resolution | open => no change required |
2012-05-01 06:24 | Eric NOULARD | Fixed in Version | => CMake 2.8.6 |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |