mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-17 04:18:06 +00:00
Add support for standalone leak-sanitizer, introducting the environment
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.
This commit is contained in:
@ -570,6 +570,10 @@ static void set_up_environment(afl_forkserver_t *fsrv) {
|
||||
"handle_sigfpe=0:"
|
||||
"handle_sigill=0",
|
||||
0);
|
||||
setenv("LSAN_OPTIONS",
|
||||
"exitcode=" STRINGIFY(LSAN_ERROR) ":"
|
||||
"fast_unwind_on_malloc=0",
|
||||
0);
|
||||
|
||||
setenv("UBSAN_OPTIONS",
|
||||
"halt_on_error=1:"
|
||||
|
Reference in New Issue
Block a user