[LLVMdev] How do I add suppressions to LSan when testing LLVM with ASan enabled?

Sergey Matveev earthdok at google.com
Wed Jan 14 14:43:17 PST 2015


I assumed that the leak is in libedit code, which we can't fix.

It's possible (though less likely) that libedit passes the result of
wstrdup back to the caller and expects us to deallocate it.

On Thu, Jan 15, 2015 at 1:31 AM, Kostya Serebryany <kcc at google.com> wrote:

> I would say, run with ASAN_OPTIONS=fast_unwind_on_malloc=0 and let us see
> the stack trace.
> We are not using the suppressions with llvm yet,
> and we are not yet using ScopedDisabler in the LLVM sources.
> If this is an intentional leak that happens once in the process we have
> BuryPointer for that.
> If this is a real bad  leak, use ScopedDisabler locally, but don't commit
> (fix instead).
>
> On Wed, Jan 14, 2015 at 6:39 AM, Sergey Matveev <earthdok at google.com>
> wrote:
>
>> Run it with the slow unwinder (ASAN_OPTIONS=fast_unwind_on_malloc=0) to
>> identify the call site, then wrap the call in an __lsan::ScopedDisabler.
>>
>> - Sergey
>>
>> On Wed, Jan 14, 2015 at 1:27 PM, Chandler Carruth <chandlerc at google.com>
>> wrote:
>>
>>> I get leaks from a system library:
>>>
>>> ==16272==ERROR: LeakSanitizer: detected memory leaks
>>>
>>> Direct leak of 148 byte(s) in 2 object(s) allocated from:
>>>     #0 0x4a3172 in __interceptor_malloc
>>> .../build/../projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40:3
>>>     #1 0x7f575d8df1fe in wcsdup (/lib64/libedit.so.0+0x1c1fe)
>>>
>>> I don't think I can fix this... ;]
>>>
>>> -Chandler
>>>
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>>
>>>
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150115/8f4bc505/attachment.html>


More information about the llvm-dev mailing list