[cfe-dev] leaks in clang (many!)

David Blaikie dblaikie at gmail.com
Wed Apr 23 22:30:30 PDT 2014


On Wed, Apr 23, 2014 at 10:21 PM, Nico Weber <thakis at chromium.org> wrote:
> On Wed, Apr 23, 2014 at 10:09 PM, Kostya Serebryany <kcc at google.com> wrote:
>>
>>
>>
>>
>> On Thu, Apr 24, 2014 at 1:53 AM, Nico Weber <thakis at chromium.org> wrote:
>>>
>>> Do you have a bot that provides an up-to-date list of these reports?
>>
>>
>> No bot, but I've just updated http://llvm.org/bugs/show_bug.cgi?id=19521
>> with the new log.
>> The leak from http://llvm.org/bugs/show_bug.cgi?id=19520 appears over 1000
>> times while running check-clang,
>> so I suppressed it, all other leaks are in the log:
>> http://llvm.org/bugs/attachment.cgi?id=12428
>> Quite a few still.
>
>
> Down from 4200 to 1500 (or 2500, if you don't count the 1000 suppressed),
> that's good progress :-)
>
> Many of these are in CGDebugInfo

Could you point me to the bugs/stack traces/repro steps for CGDebugInfo leaks?

> and some in CodeGenFunction – if someone
> who knows that code could look at these (it's probably just 2-4 bugs),
> that'd be a huge help.
>
>>
>>
>>
>> There are also 14  leaks while running check-llvm, added a separate log:
>> http://llvm.org/bugs/attachment.cgi?id=12429
>>
>>
>>>
>>> r207031 probably fixes many of the convertCommentToXML stacks.
>>
>> Thanks for this and all the other fixes!
>>
>> --kcc
>>>
>>>
>>>
>>> On Wed, Apr 23, 2014 at 6:25 AM, Kostya Serebryany <kcc at google.com>
>>> wrote:
>>>>
>>>> Manuel mentions that clang has some intentional leaks.
>>>> That's right, and we handle them using BuryPointer
>>>> (./lib/Frontend/CompilerInvocation.cpp).
>>>> So if there are more *intentional* leaks we need to bury them too to let
>>>> LSan find the interesting ones.
>>>>
>>>> --kcc
>>>>
>>>>
>>>> On Wed, Apr 23, 2014 at 4:25 PM, Kostya Serebryany <kcc at google.com>
>>>> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> TL;DR: there are tons of leaks in Clang, please help us fix them.
>>>>>
>>>>> We have a build bot that runs clang bootstrap under AddressSanitizer
>>>>> (ASan).
>>>>> LeakSanitizer (LSan, a leak detector that runs as part of ASan) is
>>>>> enabled on that bot,
>>>>> but as we've learned today only on part of the bootstrap actually runs
>>>>> LSan.
>>>>> LSan is enabled by the env. var ASAN_OPTIONS=detect_leaks=1 and we have
>>>>> this env. var. set on the bot so the 3-rd stage build uses it.
>>>>> However the lit runner clears the environment and the lit
>>>>> tests were not running under lsan until today, when I tried to enable
>>>>> lsan by default.
>>>>>
>>>>> This has discovered tons of leaks and I reverted the change.
>>>>> The leaks happen in various modes that are not exercised during regular
>>>>> self-compilation on linux,
>>>>> e.g. static analyzer, -emit-llvm, Windows ABI, etc.
>>>>> I've filed a few bugs (19520 19522 19523 19524) but there are dozens
>>>>> more reports left.
>>>>>
>>>>> If you care about leaks in clang, please check
>>>>> http://llvm.org/bugs/attachment.cgi?id=12423
>>>>> and see if any of these leaks are in your code.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> --kcc
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> cfe-dev mailing list
>>>> cfe-dev at cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>>>
>>>
>>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>




More information about the cfe-dev mailing list