[llvm] r293330 - Fix ASAN failure in cxa_demangle

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


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

>
> On Jan 27, 2017, at 1:02 PM, Kostya Serebryany <kcc at google.com> wrote:
>
>
>
> 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
>
>
> Yes :)
>
> The relicensing may solved this. The GitHub may help as well (by being
> able to share a top-level demangle project).
>
> In the meantime the version copied in LLVM can be targeted on the command
> line with llvm-cxxfilt.
>

So, since these are the same now, I won't add it to regular fuzzing on
OSS-Fuzz (https://github.com/google/oss-fuzz).
If this changes, please ping me, or feel free to add a new fuzzer yourself.


>
>> 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/8c79f01a/attachment.html>


More information about the llvm-commits mailing list