[Lldb-commits] [lldb] r118299 - /lldb/trunk/source/Symbol/ObjectFile.cpp
Johnny Chen
johnny.chen at apple.com
Fri Nov 5 14:43:20 PDT 2010
Author: johnny
Date: Fri Nov 5 16:43:19 2010
New Revision: 118299
URL: http://llvm.org/viewvc/llvm-project?rev=118299&view=rev
Log:
Fix the infinite recursion crash reported by Antoine Missout:
rdar://problem/8557095 lldb disas crashed (from lldb developer)
Modified:
lldb/trunk/source/Symbol/ObjectFile.cpp
Modified: lldb/trunk/source/Symbol/ObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ObjectFile.cpp?rev=118299&r1=118298&r2=118299&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ObjectFile.cpp (original)
+++ lldb/trunk/source/Symbol/ObjectFile.cpp Fri Nov 5 16:43:19 2010
@@ -59,6 +59,11 @@
}
}
+ // No need to delegate further if (file_offset, file_size) exceeds the total file size.
+ // This is the base case.
+ if (file_offset + file_size > file->GetByteSize())
+ return NULL;
+
DataBufferSP file_header_data_sp(file->ReadFileContents(file_offset, 512));
uint32_t idx;
More information about the lldb-commits
mailing list