View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015308CMakeCPackpublic2014-12-15 04:052015-06-01 08:38
ReporterXi Yang 
Assigned ToDomen Vrankar 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionfixed 
Platformx86_64OSDebianOS VersionJessie
Product VersionCMake 3.0.2 
Target VersionCMake 3.1.1Fixed in VersionCMake 3.1.1 
Summary0015308: CPack seg fault during stripping
DescriptionWhile running cpack individually using a generated cpack configure file, it crashed without any error messages:

$ cpack
CPack: Create package using DEB
CPack: Install projects
Segmentation fault

The backtrace:

#0 cmCPackGenerator::InstallProjectViaInstallCMakeProjects (this=0xa21be0, setDestDir=true,
    baseTempInstallDirectory=0xa28a48 "/home/yangxi/projects/GenoEye-build/package/deb/lib/_CPack_Packages/DEB/libgenoeye") at ../../Source/CPack/cmCPackGenerator.cxx:633
#1 0x000000000049c954 in cmCPackGenerator::InstallProject (this=this@entry=0xa21be0)
    at ../../Source/CPack/cmCPackGenerator.cxx:257
0000002 0x000000000049cdef in cmCPackGenerator::DoPackage (this=0xa21be0) at ../../Source/CPack/cmCPackGenerator.cxx:1045
0000003 0x000000000048dfed in main (argc=<optimized out>, argv=<optimized out>) at ../../Source/CPack/cpack.cxx:434
Additional InformationThe CPackConfig.cmake is attached, hopefully it could provide some hints.
TagsNo tags attached.
Attached Files? file icon CPackConfig.cmake [^] (612 bytes) 2014-12-15 04:05
? file icon core [^] (1,806,336 bytes) 2014-12-15 20:55

 Relationships

  Notes
(0037464)
Xi Yang (reporter)
2014-12-15 20:55

and the uploaded file "core" is the core dump file
(0037554)
Domen Vrankar (developer)
2015-01-05 06:40

This bug affects all cpack generators.

Problem is this line:
set(CPACK_CMAKE_GENERATOR Unix Makefiles)

Quotes are missing: "Unix Makefiles"
Because of that variable becomes a list with two elements (Unix, Makefiles) and since this is an invalid generator it doesn't get initialized and the code that checks that is missing.

I have already written a fix that detects an invalid generator name and logs it as error instead of producing a core dump. I'll upload it in the afternoon.

Was the generator that you used to generate CPackConfig.cmake file a part of CMake/CPack or some external tool?
(0037683)
Domen Vrankar (developer)
2015-01-14 04:27

Fixed with commit: www.cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f89e41c3
(0037685)
Brad King (manager)
2015-01-14 08:45

Since this fixes a crash, I backported it for inclusion in 3.1.1:

 CPack: Avoid crash on invalid CMake generator name
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ea916230 [^]
(0038837)
Robert Maynard (manager)
2015-06-01 08:38

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

 Issue History
Date Modified Username Field Change
2014-12-15 04:05 Xi Yang New Issue
2014-12-15 04:05 Xi Yang File Added: CPackConfig.cmake
2014-12-15 09:15 Brad King Target Version => CMake 3.2
2014-12-15 11:55 Brad King Assigned To => Domen Vrankar
2014-12-15 11:55 Brad King Status new => assigned
2014-12-15 20:55 Xi Yang File Added: core
2014-12-15 20:55 Xi Yang Note Added: 0037464
2015-01-05 06:40 Domen Vrankar Note Added: 0037554
2015-01-14 04:27 Domen Vrankar Note Added: 0037683
2015-01-14 04:27 Domen Vrankar Status assigned => resolved
2015-01-14 04:27 Domen Vrankar Fixed in Version => CMake 3.2
2015-01-14 04:27 Domen Vrankar Resolution open => fixed
2015-01-14 08:45 Brad King Note Added: 0037685
2015-01-14 08:45 Brad King Fixed in Version CMake 3.2 => CMake 3.1.1
2015-01-14 08:45 Brad King Target Version CMake 3.2 => CMake 3.1.1
2015-06-01 08:38 Robert Maynard Note Added: 0038837
2015-06-01 08:38 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team