Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[build] add --with-sanitizers= option for sanitizer builds #366

Merged
merged 1 commit into from
Oct 9, 2019

Conversation

fabbione
Copy link
Member

@fabbione fabbione commented Oct 9, 2019

those options are stricly meant for runtime debugging purposes.
do NOT use in production.

check gcc man pages on how to use ASAN and UBSAN.

Signed-off-by: Fabio M. Di Nitto [email protected]

@fabbione fabbione changed the title [build] add options for ASAN and UBSAN builds WIP: [build] add options for ASAN and UBSAN builds Oct 9, 2019
@fabbione fabbione changed the title WIP: [build] add options for ASAN and UBSAN builds [build] add options for ASAN/UBSAN/TSAN runtime sanitizer builds Oct 9, 2019
this option is stricly meant for runtime debugging purposes.
do NOT use in production.

check gcc/clang man pages on how to use ASAN/UBSAN/TSAN.

Also allow to users to specificy SANITIZERS_CFLAGS and SANITIZERS_LDFLAGS
for advanced use.

Signed-off-by: Fabio M. Di Nitto <[email protected]>
@fabbione fabbione changed the title [build] add options for ASAN/UBSAN/TSAN runtime sanitizer builds [build] add --with-sanitizers= option for sanitizer builds Oct 9, 2019
@ThomasLamprecht
Copy link

I used such options quite a bit and the integrations looks OK, so FWIW:
Reviewed-by: Thomas Lamprecht [email protected]
Tested-by: Thomas Lamprecht [email protected]

Note for ASAN: as the tests seldom care about freeing allocated memory, there are tons of "false positive" (i.e., no one cares for that in short lived testing programs) so one needs to run the check target with something like export ASAN_OPTIONS="detect_leaks=0" to filter those out.

Copy link
Member

@jfriesse jfriesse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice patch so ACK by me .

@fabbione fabbione merged commit 16abeeb into master Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants