Skip to content

Add support for standalone leak-sanitizer - #855

Merged
vanhauser-thc merged 5 commits into
AFLplusplus:devfrom
MegaManSec:leak-sanitizer
Apr 4, 2021
Merged

vanhauser-thc merged 5 commits into
AFLplusplus:devfrom
MegaManSec:leak-sanitizer

Conversation

@MegaManSec

@MegaManSec MegaManSec commented Apr 2, 2021

Copy link
Copy Markdown

Add support for standalone leak-sanitizer, introducting the environment variable AFL_USE_LSAN.

AFL_USE_LSAN introduces the macro __AFL_LEAK_CHECK() which will check
for a memory leak when the macro is run. This is especially helpful
when using __AFL_LOOP().

If __AFL_LEAK_CHECK() is not used when AFL_USE_LSAN=1 is set,
the leak checker will run when the program exits.

Fixes #825.

Joshua Rogers added 2 commits April 2, 2021 22:23
variable AFL_USE_LSAN.

AFL_USE_LSAN introduces the macro __AFL_CHECK_LEAK() which will check
for a memory leak when the macro is run. This is especially helpful
when using __AFL_LOOP().

If __AFL_LEAK_CHECK() is not used when AFL_USE_LSAN=1 is set,
the leak checker will run when the program exits.
Fix spelling mistakes.

Correctly call LSAN_ERROR not MSAN_ERROR.
Comment thread README.md Outdated
Comment thread docs/env_variables.md Outdated
Comment thread src/afl-analyze.c
Comment thread src/afl-cc.c
Comment thread src/afl-cc.c Outdated
Comment thread src/afl-forkserver.c
@vanhauser-thc
vanhauser-thc changed the base branch from stable to dev April 3, 2021 07:29
@vanhauser-thc

Copy link
Copy Markdown
Member

For the future please note that we only accepts PRs to dev, I changed the base now.

A few questions and issues, looks good otherwise!

Joshua Rogers added 2 commits April 3, 2021 14:50
Use symbolize=0 for LSAN,
Remove syntactic sugar.
Comment thread src/afl-analyze.c
Comment thread src/afl-cc.c Outdated
use LSAN_OPTIONS=print_suppressions=0
@vanhauser-thc

Copy link
Copy Markdown
Member

LGTM, thank you!

@vanhauser-thc
vanhauser-thc merged commit c23183f into AFLplusplus:dev Apr 4, 2021
@MegaManSec

Copy link
Copy Markdown
Author

Thank you for the assistance.

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.

LSAN not aborting in persistent mode

2 participants