[llvm] r293330 - Fix ASAN failure in cxa_demangle

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 27 13:02:24 PST 2017


On Fri, Jan 27, 2017 at 1:00 PM, Mehdi Amini <mehdi.amini at apple.com> wrote:

> My understanding is that they are supposed to stay the same and are
> duplicated only for licensing reason.
>

/me horrified


>
>> Mehdi
>
>
>
> On Jan 27, 2017, at 12:59 PM, Kostya Serebryany <kcc at google.com> wrote:
>
> Do we want to fuzz llvm/trunk/lib/Demangle/ItaniumDemangle.cpp in
> addition to libcxxabi/trunk/src/cxa_demangle.cpp?
> Are we going to have both long term, or just one?
>
> On Fri, Jan 27, 2017 at 12:32 PM, Mehdi Amini via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> Author: mehdi_amini
>> Date: Fri Jan 27 14:32:16 2017
>> New Revision: 293330
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=293330&view=rev
>> Log:
>> Fix ASAN failure in cxa_demangle
>>
>> Found with ASAN + libFuzzer by Kostya Serebryany <kcc at google.com>
>>
>> Modified:
>>     llvm/trunk/lib/Demangle/ItaniumDemangle.cpp
>>
>> Modified: llvm/trunk/lib/Demangle/ItaniumDemangle.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Demangle/
>> ItaniumDemangle.cpp?rev=293330&r1=293329&r2=293330&view=diff
>> ============================================================
>> ==================
>> --- llvm/trunk/lib/Demangle/ItaniumDemangle.cpp (original)
>> +++ llvm/trunk/lib/Demangle/ItaniumDemangle.cpp Fri Jan 27 14:32:16 2017
>> @@ -1402,7 +1402,8 @@ static const char *parse_function_type(c
>>          int ref_qual = 0;
>>          while (true) {
>>            if (t == last) {
>> -            db.names.pop_back();
>> +            if (!db.names.empty())
>> +              db.names.pop_back();
>>              return first;
>>            }
>>            if (*t == 'E') {
>>
>>
>> _______________________________________________
>> 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/20170127/778e90d6/attachment.html>


More information about the llvm-commits mailing list