Merge pull request #855 from MegaManSec/leak-sanitizer

Add support for standalone leak-sanitizer
This commit is contained in:
van Hauser
2021-04-04 15:28:42 +02:00
committed by GitHub
14 changed files with 123 additions and 16 deletions

View File

@ -2490,6 +2490,19 @@ void check_asan_opts(afl_state_t *afl) {
}
x = get_afl_env("LSAN_OPTIONS");
if (x) {
if (!strstr(x, "symbolize=0")) {
FATAL("Custom LSAN_OPTIONS set without symbolize=0 - please fix!");
}
}
}
/* Handle stop signal (Ctrl-C, etc). */
@ -2735,7 +2748,8 @@ void check_binary(afl_state_t *afl, u8 *fname) {
}
if (memmem(f_data, f_len, "__asan_init", 11) ||
memmem(f_data, f_len, "__msan_init", 11)) {
memmem(f_data, f_len, "__msan_init", 11) ||
memmem(f_data, f_len, "__lsan_init", 11)) {
afl->fsrv.uses_asan = 1;