Skip to content

LSan: "LSAN_OPTIONS" docs should be updated to be clearer on valid inputs #1670

Open
@mchristoff

Description

@mchristoff

Currently, the LeakSanitizer documentation page is pretty sparse on the specifics of "LSAN_OPTIONS" syntax:
https://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizer

It took me quite a while to figure out that the only way to have spaces in the "LSAN_OPTIONS" environment variable was to use single (not double) quotes. This limitation isn't very well documented, though it should be.
i.e.
setenv LSAN_OPTIONS "suppressions='/tmp/white space/lsan_suppress'" works but
setenv LSAN_OPTIONS "suppressions=/tmp/white space/lsan_suppress" or
setenv LSAN_OPTIONS "suppressions=\"/tmp/white space/lsan_suppress\"" don't work.

Including an example of multiple flags being added to the "LSAN_OPTIONS" environment variable would also be helpful:
setenv LSAN_OPTIONS "allocator_may_return_null=1:suppressions=/tmp/lsan_suppress"

I would note that this can also apply to all the other "*_OPTIONS" variables for the other sanitizers.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions