View Issue Details [ Jump to Notes ] | [ Print ] |
ID | Project | Category | View Status | Date Submitted | Last Update |
0008704 | CMake | CMake | public | 2009-03-09 04:13 | 2009-03-12 19:26 |
|
Reporter | Kevin Kofler | |
Assigned To | Alex Neundorf | |
Priority | normal | Severity | crash | Reproducibility | random |
Status | closed | Resolution | fixed | |
Platform | | OS | | OS Version | |
Product Version | CMake-2-6 | |
Target Version | | Fixed in Version | | |
|
Summary | 0008704: CMake 2.6.2 and 2.6.3 (and possibly earlier versions) sometimes crash during the build of kdepimlibs |
Description | CMake 2.6.2 and 2.6.3 (and possibly earlier versions) sometimes (mostly randomly, though under some conditions it can be reproduced quite reliably) crash during the build of kdepimlibs. This has been observed at least on the Fedora PPC64 builders - see https://bugzilla.redhat.com/show_bug.cgi?id=475876 [^] - and by a Debian user on x86_64. |
Additional Information | We have tracked down the problem in the referenced Fedora bug to be caused by the calls to ret.erase in cmIncludeDirectoryCommand::AddDirectory. The stopping criteria in the while loops are faulty.
Here's a 2-line patch which appears to fix the problem:
http://cvs.fedoraproject.org/viewvc/rpms/cmake/devel/cmake-2.6.3-%23475876.patch?revision=1.1&view=markup [^]
(I'm also attaching it to this report.) |
Tags | No tags attached. |
|
Attached Files | cmake-2.6.3-#475876.patch [^] (723 bytes) 2009-03-09 04:13 [Show Content] [Hide Content]diff -ur cmake-2.6.3/Source/cmIncludeDirectoryCommand.cxx cmake-2.6.3-#475876/Source/cmIncludeDirectoryCommand.cxx
--- cmake-2.6.3/Source/cmIncludeDirectoryCommand.cxx 2009-02-21 21:36:52.000000000 +0100
+++ cmake-2.6.3-#475876/Source/cmIncludeDirectoryCommand.cxx 2009-03-09 02:55:46.000000000 +0100
@@ -95,13 +95,13 @@
// remove any leading or trailing spaces and \r
pos = ret.size()-1;
- while(ret[pos] == ' ' || ret[pos] == '\r')
+ while(ret.size() && (ret[pos] == ' ' || ret[pos] == '\r'))
{
ret.erase(pos);
pos--;
}
pos = 0;
- while(ret.size() && ret[pos] == ' ' || ret[pos] == '\r')
+ while(ret.size() && (ret[pos] == ' ' || ret[pos] == '\r'))
{
ret.erase(pos,1);
}
|
|