View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015367 | CMake | CMake | public | 2015-01-22 23:04 | 2015-07-08 08:57 | ||||
Reporter | Thomas Klausner | ||||||||
Assigned To | Brad King | ||||||||
Priority | high | Severity | crash | Reproducibility | sometimes | ||||
Status | closed | Resolution | fixed | ||||||
Platform | amd64 | OS | NetBSD | OS Version | 7.99.4 | ||||
Product Version | CMake 3.1 | ||||||||
Target Version | CMake 3.1.2 | Fixed in Version | CMake 3.1.2 | ||||||
Summary | 0015367: 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. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | patch-Source_kwsys_Directory.cxx [^] (491 bytes) 2015-01-22 23:04 | ||||||||
Relationships | |
Relationships |
Notes | |
(0037788) Brad King (manager) 2015-01-23 13:17 |
Thanks. I've applied a fix in KWSys upstream and submitted for testing here: http://review.source.kitware.com/18941 [^] Once merged there it can be integrated into CMake too. |
(0037811) Brad King (manager) 2015-01-26 10:27 |
This has now been integrated in upstream KWSys and ported to CMake: KWSys Directory: Check opendir return value before using it http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=482c8475 [^] |
(0037923) Brad King (manager) 2015-02-05 09:24 |
I merged this fix into the 'release' branch for 3.1.2. |
(0039040) Robert Maynard (manager) 2015-07-08 08:57 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2015-01-22 23:04 | Thomas Klausner | New Issue | |
2015-01-22 23:04 | Thomas Klausner | File Added: patch-Source_kwsys_Directory.cxx | |
2015-01-23 13:17 | Brad King | Note Added: 0037788 | |
2015-01-26 10:27 | Brad King | Note Added: 0037811 | |
2015-01-26 10:27 | Brad King | Assigned To | => Brad King |
2015-01-26 10:27 | Brad King | Status | new => resolved |
2015-01-26 10:27 | Brad King | Resolution | open => fixed |
2015-01-26 10:27 | Brad King | Fixed in Version | => CMake 3.2 |
2015-01-26 10:27 | Brad King | Target Version | => CMake 3.2 |
2015-02-05 09:24 | Brad King | Note Added: 0037923 | |
2015-02-05 09:24 | Brad King | Fixed in Version | CMake 3.2 => CMake 3.1.2 |
2015-02-05 09:24 | Brad King | Target Version | CMake 3.2 => CMake 3.1.2 |
2015-07-08 08:57 | Robert Maynard | Note Added: 0039040 | |
2015-07-08 08:57 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |