[llvm] r305617 - Don't crash if a type record can't be found.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 19 09:58:46 PDT 2017
It was already covered, but to save time i only ran the test suite on a
couple of subdirectories to verify my change, and it was triggering
somewhere else which i only saw on a bot.
That said, there's probably a case to be made for a specific targeted test
for this. Probably in a unit test
On Mon, Jun 19, 2017 at 9:51 AM David Blaikie <dblaikie at gmail.com> wrote:
> Was this already covered by tests/picked up by a buildbot when the
> regression was introduced?
>
> On Fri, Jun 16, 2017 at 5:02 PM Zachary Turner via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> Author: zturner
>> Date: Fri Jun 16 19:02:24 2017
>> New Revision: 305617
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=305617&view=rev
>> Log:
>> Don't crash if a type record can't be found.
>>
>> This was a regression introduced in a previous patch. Adding
>> back the code that handles this case.
>>
>> Modified:
>> llvm/trunk/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp
>>
>> Modified: llvm/trunk/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp?rev=305617&r1=305616&r2=305617&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp
>> (original)
>> +++ llvm/trunk/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp Fri
>> Jun 16 19:02:24 2017
>> @@ -75,6 +75,15 @@ StringRef LazyRandomTypeCollection::getT
>> if (Index.isNoneType() || Index.isSimple())
>> return TypeIndex::simpleTypeName(Index);
>>
>> + // Try to make sure the type exists. Even if it doesn't though, it
>> may be
>> + // because we're dumping a symbol stream with no corresponding type
>> stream
>> + // present, in which case we still want to be able to print <unknown
>> UDT>
>> + // for the type names.
>> + if (auto EC = ensureTypeExists(Index)) {
>> + consumeError(std::move(EC));
>> + return "<unknown UDT>";
>> + }
>> +
>> uint32_t I = Index.toArrayIndex();
>> if (I >= TypeNames.size())
>> TypeNames.resize(I + 1);
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170619/a05a6fc9/attachment.html>
More information about the llvm-commits
mailing list