diff options
author | Sean Callanan <scallanan@apple.com> | 2012-07-07 00:29:33 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2012-07-07 00:29:33 +0000 |
commit | 210b815f9dfb2dc249af44ef346522bb5a388228 (patch) | |
tree | 10061ce58e94ab8ddea89a6e2514d76ff33da1df | |
parent | 56543735c92f0bc7fc6101df36dacbdce97f06d2 (diff) | |
download | bcm5719-llvm-210b815f9dfb2dc249af44ef346522bb5a388228.tar.gz bcm5719-llvm-210b815f9dfb2dc249af44ef346522bb5a388228.zip |
Fixed a crash in the class uniq'ing code where we
didn't check if the two classes had the same number
of members.
<rdar://problem/11678873>
llvm-svn: 159880
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index 6fe0484fc0e..3b474535ed1 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -4995,6 +4995,18 @@ SymbolFileDWARF::CopyUniqueClassMethodTypes (Type *class_type, if (src_size && dst_size) { + if (src_size != dst_size) + { + if (log) + log->Printf("warning: tried to unique class DIE 0x%8.8x to 0x%8.8x, but they didn't have the same size (src=%d, dst=%d)", + src_class_die->GetOffset(), + dst_class_die->GetOffset(), + src_size, + dst_size); + + return false; + } + uint32_t idx; for (idx = 0; idx < src_size; ++idx) { |