[cfe-users] Disable Leak Sanitizer

Alexey Samsonov vonosmas at gmail.com
Fri Mar 6 16:59:21 PST 2015


Hi Jeffrey,

At one point we should go and document it on the wiki, for now I'll just
briefly outline options here:

There are multiple ways to disable LeakSanitizer:
1) source-level annotations (see <sanitizer/lsan_interface.h> header) -
mark specific objects as intentionally-leaked
2) link in
extern "C" int __lsan_is_turned_off() { return 1; }
into binary (see <sanitizer/lsan_interface.h>) you want to exclude from
leak detection.
3) pass ASAN_OPTIONS=detect_leaks=0 environment variable to disable leak
detection at run-time.





On Thu, Mar 5, 2015 at 5:03 PM, Jeffrey Walton <noloader at gmail.com> wrote:

> I recently upgraded from Clang 3.4 to 3.5. Clang 3.5 added a Leak
> Sanitizer, and its part of Asan.
>
> Leak Sanitizer is aborting a test suite because the developers don't
> think its important to fix a test program (sigh...). I want to disable
> Leak Sanitizer, but http://clang.llvm.org/docs/AddressSanitizer.html
> and https://code.google.com/p/address-sanitizer/wiki/LeakSanitizer
> does not discuss it.
>
> I don't really want to go through and write a suppression rule for
> each offending function. That's because there are 6 components in this
> suite, and the tests for them may change over time.
>
> How do I disable the Leak Sanitizer?
>
> Thanks in advance.
> _______________________________________________
> cfe-users mailing list
> cfe-users at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users
>



-- 
Alexey Samsonov
vonosmas at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20150306/59885f59/attachment.html>


More information about the cfe-users mailing list