Skip to content

Add support for standalone leak-sanitizer #855

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

Merged
merged 5 commits into from
Apr 4, 2021
Merged

Add support for standalone leak-sanitizer #855

merged 5 commits into from
Apr 4, 2021

Conversation

MegaManSec
Copy link

@MegaManSec MegaManSec commented Apr 2, 2021

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.
@vanhauser-thc vanhauser-thc changed the base branch from stable to dev April 3, 2021 07:29
@vanhauser-thc
Copy link
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.
use LSAN_OPTIONS=print_suppressions=0
@vanhauser-thc
Copy link
Member

LGTM, thank you!

@vanhauser-thc vanhauser-thc merged commit c23183f into AFLplusplus:dev Apr 4, 2021
@MegaManSec
Copy link
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