[llvm] r305617 - Don't crash if a type record can't be found.
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 19 10:00:30 PDT 2017
On Mon, Jun 19, 2017 at 9:58 AM Zachary Turner <zturner at google.com> wrote:
> 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.
>
Oh, sure - yeah, I do that pretty regularly too.
> That said, there's probably a case to be made for a specific targeted test
> for this. Probably in a unit test
>
If you reckon so. I was just checking that the basics were covered.
> 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/e49fa643/attachment.html>
More information about the llvm-commits
mailing list