[llvm] r303408 - Don't crash if someone tries to visit an empty type stream.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Mon May 22 12:48:45 PDT 2017
This change ended up being incorrect and was reverted later in the day as
part of a 5 commit revert. See the commit message of that revert and the
subsequent resubmit for details. I'm not at my desk at the moment
On Mon, May 22, 2017 at 11:53 AM David Blaikie <dblaikie at gmail.com> wrote:
> Test case?
>
> On Thu, May 18, 2017 at 10:31 PM Zachary Turner via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> Author: zturner
>> Date: Fri May 19 00:18:09 2017
>> New Revision: 303408
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=303408&view=rev
>> Log:
>> Don't crash if someone tries to visit an empty type stream.
>>
>> Modified:
>> llvm/trunk/lib/DebugInfo/CodeView/CVTypeVisitor.cpp
>>
>> Modified: llvm/trunk/lib/DebugInfo/CodeView/CVTypeVisitor.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/CodeView/CVTypeVisitor.cpp?rev=303408&r1=303407&r2=303408&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/lib/DebugInfo/CodeView/CVTypeVisitor.cpp (original)
>> +++ llvm/trunk/lib/DebugInfo/CodeView/CVTypeVisitor.cpp Fri May 19
>> 00:18:09 2017
>> @@ -227,6 +227,9 @@ Error CVTypeVisitor::visitTypeStream(CVT
>> }
>>
>> Error CVTypeVisitor::visitTypeStream(TypeCollection &Types) {
>> + if (Types.empty())
>> + return Error::success();
>> +
>> Optional<TypeIndex> I = Types.getFirst();
>> do {
>> CVType Type = Types.getType(*I);
>>
>>
>> _______________________________________________
>> 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/20170522/b8ff5ee3/attachment.html>
More information about the llvm-commits
mailing list