MantisBT - CMake | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0016048 | CMake | CMake | public | 2016-04-01 15:22 | 2016-06-10 14:21 | |||||
Reporter | arlbranch | |||||||||
Assigned To | ||||||||||
Priority | high | Severity | crash | Reproducibility | always | |||||
Status | closed | Resolution | duplicate | |||||||
Platform | x86_64 | OS | Linux | OS Version | 4.4.5-1-ARCH | |||||
Product Version | CMake 3.5.1 | |||||||||
Target Version | Fixed in Version | |||||||||
Summary | 0016048: Segfault on target_link_libraries() with aliased target from another subdirectory | |||||||||
Description | CMake crashes with a segfault when target_link_libraries is used to add a dependency on an alias of a target that was added in a different subdirectory. Complete Example ================ [branch@fortuna on /dev/pts/1] 1150 ~/repositories/test/cmake_segfault $ cmake --version cmake version 3.5.1 CMake suite maintained and supported by Kitware (kitware.com/cmake). [branch@fortuna on /dev/pts/1] 1151 ~/repositories/test/cmake_segfault $ ls -lR .: total 12 drwxr-xr-x 2 branch atlsdd 4096 Apr 1 13:37 alib/ drwxr-xr-x 2 branch atlsdd 4096 Apr 1 14:14 blib/ -rw-r--r-- 1 branch atlsdd 98 Apr 1 13:18 CMakeLists.txt ./alib: total 4 -rw-r--r-- 1 branch atlsdd 87 Apr 1 13:24 CMakeLists.txt ./blib: total 4 -rw-r--r-- 1 branch atlsdd 162 Apr 1 13:38 CMakeLists.txt [branch@fortuna on /dev/pts/1] 1152 ~/repositories/test/cmake_segfault $ cat CMakeLists.txt cmake_minimum_required(VERSION 2.8.11) project(top) add_subdirectory(alib) add_subdirectory(blib) [branch@fortuna on /dev/pts/1] 1153 ~/repositories/test/cmake_segfault $ cat alib/CMakeLists.txt add_library(alib alib.c) set_source_files_properties(alib.c PROPERTIES GENERATED TRUE) [branch@fortuna on /dev/pts/1] 1154 ~/repositories/test/cmake_segfault $ cat blib/CMakeLists.txt add_library(blib blib.c) set_source_files_properties(blib.c PROPERTIES GENERATED TRUE) add_library(alib::alib ALIAS alib) target_link_libraries(blib alib::alib) [branch@fortuna on /dev/pts/1] 1155 ~/repositories/test/cmake_segfault $ mkdir build && cd build [branch@fortuna on /dev/pts/1] 1156 ~/repositories/test/cmake_segfault/build $ cmake .. -- The C compiler identification is GNU 5.3.0 -- The CXX compiler identification is GNU 5.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done Segmentation fault (core dumped) | |||||||||
Steps To Reproduce | 1) create the project in the Description 2) run cmake against it | |||||||||
Additional Information | Also seen on MacOS. This is a regression, cmake 3.4 does not crash. | |||||||||
Tags | No tags attached. | |||||||||
Relationships |
| |||||||||
Attached Files | ||||||||||
Issue History | ||||||||||
Date Modified | Username | Field | Change | |||||||
2016-04-01 15:22 | arlbranch | New Issue | ||||||||
2016-04-01 15:30 | Brad King | Relationship added | duplicate of 0016044 | |||||||
2016-04-01 15:30 | Brad King | Note Added: 0040798 | ||||||||
2016-04-01 15:43 | Brad King | Note Added: 0040799 | ||||||||
2016-04-01 15:43 | Brad King | Status | new => resolved | |||||||
2016-04-01 15:43 | Brad King | Resolution | open => duplicate | |||||||
2016-06-10 14:21 | Kitware Robot | Note Added: 0041204 | ||||||||
2016-06-10 14:21 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|