about summary refs log tree commit diff
path: root/src/afl-analyze.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2021-04-04 15:28:42 +0200
committerGitHub <noreply@github.com>2021-04-04 15:28:42 +0200
commitc23183f1dc39ce0792a879065e6aea33a4c571f8 (patch)
tree68acaf32c888de02334d15814743c1463c564c15 /src/afl-analyze.c
parent53facd8882173873a7b78860b0fb49884de90c5b (diff)
parent99819cf5d1cbc262810f26098a5796c9d1262bc5 (diff)
downloadafl++-c23183f1dc39ce0792a879065e6aea33a4c571f8.tar.gz
Merge pull request #855 from MegaManSec/leak-sanitizer
 Add support for standalone leak-sanitizer
Diffstat (limited to 'src/afl-analyze.c')
-rw-r--r--src/afl-analyze.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/afl-analyze.c b/src/afl-analyze.c
index 8e5a1772..7d7519fa 100644
--- a/src/afl-analyze.c
+++ b/src/afl-analyze.c
@@ -784,6 +784,18 @@ static void set_up_environment(char **argv) {
 
   }
 
+  x = get_afl_env("LSAN_OPTIONS");
+
+  if (x) {
+
+    if (!strstr(x, "symbolize=0")) {
+
+      FATAL("Custom LSAN_OPTIONS set without symbolize=0 - please fix!");
+
+    }
+
+  }
+
   setenv("ASAN_OPTIONS",
          "abort_on_error=1:"
          "detect_leaks=0:"
@@ -821,6 +833,14 @@ static void set_up_environment(char **argv) {
                          "handle_sigfpe=0:"
                          "handle_sigill=0", 0);
 
+   setenv("LSAN_OPTIONS",
+         "exitcode=" STRINGIFY(LSAN_ERROR) ":"
+         "fast_unwind_on_malloc=0:"
+         "symbolize=0:"
+         "print_suppressions=0",
+         0);
+
+
   if (get_afl_env("AFL_PRELOAD")) {
 
     if (qemu_mode) {