MantisBT - CMake |
View Issue Details |
|
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. |
Relationships | |
Attached Files | patch-Source_kwsys_Directory.cxx (491) 2015-01-22 23:04 https://public.kitware.com/Bug/file/5356/patch-Source_kwsys_Directory.cxx |
|
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 |