about summary refs log tree commit diff
path: root/src/afl-cc.c
diff options
context:
space:
mode:
authorJoshua Rogers <jrogers@opera.com>2021-04-04 12:45:52 +0000
committerJoshua Rogers <jrogers@opera.com>2021-04-04 12:45:52 +0000
commit99819cf5d1cbc262810f26098a5796c9d1262bc5 (patch)
tree09d0a1fb5298ae2efd0bd2d29d1643a4d3aa6a3d /src/afl-cc.c
parentfee74700836c3694c2037c1e708846150e52d5bd (diff)
downloadafl++-99819cf5d1cbc262810f26098a5796c9d1262bc5.tar.gz
Move definition of __AFL_LEAK_CHECK inside ifguards,
use LSAN_OPTIONS=print_suppressions=0
Diffstat (limited to 'src/afl-cc.c')
-rw-r--r--src/afl-cc.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/afl-cc.c b/src/afl-cc.c
index 650e4e43..e2dd06e2 100644
--- a/src/afl-cc.c
+++ b/src/afl-cc.c
@@ -819,6 +819,9 @@ static void edit_params(u32 argc, char **argv, char **envp) {
 
   if (getenv("AFL_USE_LSAN")) {
     cc_params[cc_par_cnt++] = "-fsanitize=leak";
+    cc_params[cc_par_cnt++] = "-includesanitizer/lsan_interface.h";
+    cc_params[cc_par_cnt++] =
+        "-D__AFL_LEAK_CHECK()=__lsan_do_leak_check()";
   }
 
   if (getenv("AFL_USE_CFISAN")) {
@@ -918,13 +921,6 @@ static void edit_params(u32 argc, char **argv, char **envp) {
 
   }
 
-  if (getenv("AFL_USE_LSAN")) {
-    cc_params[cc_par_cnt++] = "-includesanitizer/lsan_interface.h";
-  }
-
-  cc_params[cc_par_cnt++] =
-      "-D__AFL_LEAK_CHECK()=__lsan_do_leak_check()";
-
   cc_params[cc_par_cnt++] =
       "-D__AFL_COVERAGE_START_OFF()=int __afl_selective_coverage_start_off = "
       "1;";