[cmake-developers] [CMake 0016134]: CMake crashes at generation stage

Mantis Bug Tracker mantis at public.kitware.com
Wed Jun 1 23:58:19 EDT 2016


The following issue has been SUBMITTED. 
====================================================================== 
https://public.kitware.com/Bug/view.php?id=16134 
====================================================================== 
Reported By:                Daniel Levin
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   16134
Category:                   CMake
Reproducibility:            always
Severity:                   crash
Priority:                   high
Status:                     new
====================================================================== 
Date Submitted:             2016-06-01 23:58 EDT
Last Modified:              2016-06-01 23:58 EDT
====================================================================== 
Summary:                    CMake crashes at generation stage
Description: 
Reproducibility 100% on my personal project using either Makefile or Ninja
generator. Affected all CMake version after 3.4, earlier versions might contains
this issue as well, did not check. Provided fixup patch is for CMake 3.4.0.
Versions 3.5+ have different implementation of the same code, but bug is still
there. Please see attached Git bundle with branch 'bug' inside that contains the
fix.

Copy of the patch message:

    cmGeneratorTarget: Fix tracing dependencies in local generator
    
    When looping over the generator targets they might become indirectly
    invalidated and recreated from cmGlobalGenerator::CreateGenerationObjects().
    Thus targets container cmGeneratorTarget pointers will be deleted,
    dereferencing them leads to crashes at generation stage.
    
    To avoid this loop should iterate over cmTarget keys and look for
    cmGeneratorTarget pointers directly from Makefile instance each time.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2016-06-01 23:58 Daniel Levin   New Issue                                    
2016-06-01 23:58 Daniel Levin   File Added: crash.bundle                     
======================================================================



More information about the cmake-developers mailing list