[llvm] r303397 - Fix crasher in CodeView test.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Thu May 18 17:56:39 PDT 2017
Author: zturner
Date: Thu May 18 19:56:39 2017
New Revision: 303397
URL: http://llvm.org/viewvc/llvm-project?rev=303397&view=rev
Log:
Fix crasher in CodeView test.
Apparently this was always broken, but previously we were more
graceful about it and we would print "unknown udt" if we couldn't
find the type index, whereas now we just segfault because we
assume it's valid. But this exposed a real bug, which is that
we weren't looking in the right place. So fix that, and also
fix this crash at the same time.
Modified:
llvm/trunk/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp
Modified: llvm/trunk/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp?rev=303397&r1=303396&r2=303397&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp (original)
+++ llvm/trunk/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp Thu May 18 19:56:39 2017
@@ -242,7 +242,7 @@ Error TypeDumpVisitor::visitKnownRecord(
W->printNumber("NumStrings", Size);
ListScope Arguments(*W, "Strings");
for (uint32_t I = 0; I < Size; ++I) {
- printTypeIndex("String", Indices[I]);
+ printItemIndex("String", Indices[I]);
}
return Error::success();
}
More information about the llvm-commits
mailing list