The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=15367
======================================================================
Reported By: Thomas Klausner
Assigned To:
======================================================================
Project: CMake
Issue ID: 15367
Category: CMake
Reproducibility: sometimes
Severity: crash
Priority: high
Status: new
======================================================================
Date Submitted: 2015-01-22 23:04 EST
Last Modified: 2015-01-22 23:04 EST
======================================================================
Summary: cmake crash in GetNumberOfFilesInDirectory
Description:
In Source/kwsys/Directory.cxx, the result value of opendir() is not checked,
which can lead to readdir being called with a NULL pointer as first argument,
which, at least on NetBSD, leads to a segfault.
Steps to Reproduce:
I don't know how to cause this, but it happened to me in parallel builds on a
tmpfs e.g. when building wesnoth.
Additional Information:
The attached patch returns '0' as count for directories when opendir fails,
which makes wesnoth build for me. Perhaps dirp==NULL should be reported, but I
don't know how to best do that, so I'll leave that up to you.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2015-01-22 23:04 Thomas KlausnerNew Issue
2015-01-22 23:04 Thomas KlausnerFile Added: patch-Source_kwsys_Directory.cxx
======================================================================
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers