diff options
author | van Hauser <vh@thc.org> | 2021-04-04 15:28:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-04 15:28:42 +0200 |
commit | c23183f1dc39ce0792a879065e6aea33a4c571f8 (patch) | |
tree | 68acaf32c888de02334d15814743c1463c564c15 /src/afl-fuzz-init.c | |
parent | 53facd8882173873a7b78860b0fb49884de90c5b (diff) | |
parent | 99819cf5d1cbc262810f26098a5796c9d1262bc5 (diff) | |
download | afl++-c23183f1dc39ce0792a879065e6aea33a4c571f8.tar.gz |
Merge pull request #855 from MegaManSec/leak-sanitizer
Add support for standalone leak-sanitizer
Diffstat (limited to 'src/afl-fuzz-init.c')
-rw-r--r-- | src/afl-fuzz-init.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/afl-fuzz-init.c b/src/afl-fuzz-init.c index cb0190a0..48f3289d 100644 --- a/src/afl-fuzz-init.c +++ b/src/afl-fuzz-init.c @@ -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; |