Fix typos,
Use symbolize=0 for LSAN,
Remove syntactic sugar.
diff --git a/README.md b/README.md
index 41d55e9..4d3f8aa 100644
--- a/README.md
+++ b/README.md
@@ -601,7 +601,7 @@
For every secondary fuzzer there should be a variation, e.g.:
* one should fuzz the target that was compiled differently: with sanitizers
activated (`export AFL_USE_ASAN=1 ; export AFL_USE_UBSAN=1 ;
- export AFL_USE_CFISAN=1 ; export AFL_USE_LSAN`)
+ export AFL_USE_CFISAN=1 ; export AFL_USE_LSAN=1`)
* one should fuzz the target with CMPLOG/redqueen (see above)
* one to three fuzzers should fuzz a target compiled with laf-intel/COMPCOV
(see above). Important note: If you run more than one laf-intel/COMPCOV
diff --git a/docs/env_variables.md b/docs/env_variables.md
index 85c2efd..5f9233d 100644
--- a/docs/env_variables.md
+++ b/docs/env_variables.md
@@ -639,7 +639,8 @@
```
exit_code=23
fast_unwind_on_malloc=0
-````
+ symbolize=0
+```
Be sure to include the first ones for LSAN and MSAN when customizing
anything, since some MSAN and LSAN versions don't call `abort()` on
error, and we need a way to detect faults.
diff --git a/src/afl-analyze.c b/src/afl-analyze.c
index f961f13..38a4055 100644
--- a/src/afl-analyze.c
+++ b/src/afl-analyze.c
@@ -785,10 +785,9 @@
if (x) {
- if (!strstr(x, "exit_code=" STRINGIFY(LSAN_ERROR))) {
+ if (!strstr(x, "symbolize=0")) {
- FATAL("Custom LSAN_OPTIONS set without exit_code=" STRINGIFY(
- LSAN_ERROR) " - please fix!");
+ FATAL("Custom LSAN_OPTIONS set without symbolize=0 - please fix!");
}
@@ -833,7 +832,8 @@
setenv("LSAN_OPTIONS",
"exitcode=" STRINGIFY(LSAN_ERROR) ":"
- "fast_unwind_on_malloc=0",
+ "fast_unwind_on_malloc=0:"
+ "symbolize=0",
0);
diff --git a/src/afl-cc.c b/src/afl-cc.c
index 975b28d..650e4e4 100644
--- a/src/afl-cc.c
+++ b/src/afl-cc.c
@@ -758,7 +758,7 @@
if (!strncmp(cur, "-fsanitize-coverage-", 20) && strstr(cur, "list="))
have_instr_list = 1;
- if (!(strcmp(cur, "-fsanitize=address") && strcmp(cur, "-fsanitize=memory")))
+ if (!strcmp(cur, "-fsanitize=address") || !strcmp(cur, "-fsanitize=memory"))
asan_set = 1;
if (strstr(cur, "FORTIFY_SOURCE")) fortify_set = 1;
diff --git a/src/afl-forkserver.c b/src/afl-forkserver.c
index fa89713..f102b73 100644
--- a/src/afl-forkserver.c
+++ b/src/afl-forkserver.c
@@ -543,7 +543,8 @@
if (!getenv("LSAN_OPTIONS"))
setenv("LSAN_OPTIONS",
"exitcode=" STRINGIFY(LSAN_ERROR) ":"
- "fast_unwind_on_malloc=0",
+ "fast_unwind_on_malloc=0:"
+ "symbolize=0",
1);
fsrv->init_child_func(fsrv, argv);
diff --git a/src/afl-fuzz-init.c b/src/afl-fuzz-init.c
index 24f5c5b..6f66302 100644
--- a/src/afl-fuzz-init.c
+++ b/src/afl-fuzz-init.c
@@ -2470,10 +2470,9 @@
if (x) {
- if (!strstr(x, "exit_code=" STRINGIFY(LSAN_ERROR))) {
+ if (!strstr(x, "symbolize=0")) {
- FATAL("Custom LSAN_OPTIONS set without exit_code=" STRINGIFY(
- LSAN_ERROR) " - please fix!");
+ FATAL("Custom LSAN_OPTIONS set without symbolize=0 - please fix!");
}
diff --git a/src/afl-showmap.c b/src/afl-showmap.c
index bf07668..2b7d200 100644
--- a/src/afl-showmap.c
+++ b/src/afl-showmap.c
@@ -570,9 +570,11 @@
"handle_sigfpe=0:"
"handle_sigill=0",
0);
+
setenv("LSAN_OPTIONS",
"exitcode=" STRINGIFY(LSAN_ERROR) ":"
- "fast_unwind_on_malloc=0",
+ "fast_unwind_on_malloc=0:"
+ "symbolize=0",
0);
setenv("UBSAN_OPTIONS",
diff --git a/src/afl-tmin.c b/src/afl-tmin.c
index a2741a0..c257b67 100644
--- a/src/afl-tmin.c
+++ b/src/afl-tmin.c
@@ -764,7 +764,8 @@
setenv("LSAN_OPTIONS",
"exitcode=" STRINGIFY(LSAN_ERROR) ":"
- "fast_unwind_on_malloc=0",
+ "fast_unwind_on_malloc=0:"
+ "symbolize=0",
0);
if (get_afl_env("AFL_PRELOAD")) {