Skip to content

Setting suppressions file at compile time #1628

Open
@vpshastry

Description

@vpshastry

When I build my binary with ASAN enabled, I finally be able to run my executable with LSAN_OPTIONS=suppressions=<suppression-file> environment variable that always suppresses leaks from a specific, known, third party library. The point is, I know the suppression file at compile time. Is there a way I can set it at compile time?

Ex:
Say my binary is compiled with below options

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer")

The final binary generated is myBinary. Running myBinary should always take the suppression file set at compile time.

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