Fix typos,

Use symbolize=0 for LSAN,
Remove syntactic sugar.
This commit is contained in:
Joshua Rogers
2021-04-03 14:50:35 +00:00
parent 6514e33ab6
commit afc4da47f7
8 changed files with 17 additions and 13 deletions

View File

@ -601,7 +601,7 @@ Every -M/-S entry needs a unique name (that can be whatever), however the same
For every secondary fuzzer there should be a variation, e.g.: For every secondary fuzzer there should be a variation, e.g.:
* one should fuzz the target that was compiled differently: with sanitizers * one should fuzz the target that was compiled differently: with sanitizers
activated (`export AFL_USE_ASAN=1 ; export AFL_USE_UBSAN=1 ; 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 should fuzz the target with CMPLOG/redqueen (see above)
* one to three fuzzers should fuzz a target compiled with laf-intel/COMPCOV * 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 (see above). Important note: If you run more than one laf-intel/COMPCOV

View File

@ -639,7 +639,8 @@ optimal values if not already present in the environment:
``` ```
exit_code=23 exit_code=23
fast_unwind_on_malloc=0 fast_unwind_on_malloc=0
```` symbolize=0
```
Be sure to include the first ones for LSAN and MSAN when customizing 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 anything, since some MSAN and LSAN versions don't call `abort()` on
error, and we need a way to detect faults. error, and we need a way to detect faults.

View File

@ -785,10 +785,9 @@ static void set_up_environment(void) {
if (x) { if (x) {
if (!strstr(x, "exit_code=" STRINGIFY(LSAN_ERROR))) { if (!strstr(x, "symbolize=0")) {
FATAL("Custom LSAN_OPTIONS set without exit_code=" STRINGIFY( FATAL("Custom LSAN_OPTIONS set without symbolize=0 - please fix!");
LSAN_ERROR) " - please fix!");
} }
@ -833,7 +832,8 @@ static void set_up_environment(void) {
setenv("LSAN_OPTIONS", setenv("LSAN_OPTIONS",
"exitcode=" STRINGIFY(LSAN_ERROR) ":" "exitcode=" STRINGIFY(LSAN_ERROR) ":"
"fast_unwind_on_malloc=0", "fast_unwind_on_malloc=0:"
"symbolize=0",
0); 0);

View File

@ -758,7 +758,7 @@ static void edit_params(u32 argc, char **argv, char **envp) {
if (!strncmp(cur, "-fsanitize-coverage-", 20) && strstr(cur, "list=")) if (!strncmp(cur, "-fsanitize-coverage-", 20) && strstr(cur, "list="))
have_instr_list = 1; 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; asan_set = 1;
if (strstr(cur, "FORTIFY_SOURCE")) fortify_set = 1; if (strstr(cur, "FORTIFY_SOURCE")) fortify_set = 1;

View File

@ -543,7 +543,8 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
if (!getenv("LSAN_OPTIONS")) if (!getenv("LSAN_OPTIONS"))
setenv("LSAN_OPTIONS", setenv("LSAN_OPTIONS",
"exitcode=" STRINGIFY(LSAN_ERROR) ":" "exitcode=" STRINGIFY(LSAN_ERROR) ":"
"fast_unwind_on_malloc=0", "fast_unwind_on_malloc=0:"
"symbolize=0",
1); 1);
fsrv->init_child_func(fsrv, argv); fsrv->init_child_func(fsrv, argv);

View File

@ -2470,10 +2470,9 @@ void check_asan_opts(afl_state_t *afl) {
if (x) { if (x) {
if (!strstr(x, "exit_code=" STRINGIFY(LSAN_ERROR))) { if (!strstr(x, "symbolize=0")) {
FATAL("Custom LSAN_OPTIONS set without exit_code=" STRINGIFY( FATAL("Custom LSAN_OPTIONS set without symbolize=0 - please fix!");
LSAN_ERROR) " - please fix!");
} }

View File

@ -570,9 +570,11 @@ static void set_up_environment(afl_forkserver_t *fsrv) {
"handle_sigfpe=0:" "handle_sigfpe=0:"
"handle_sigill=0", "handle_sigill=0",
0); 0);
setenv("LSAN_OPTIONS", setenv("LSAN_OPTIONS",
"exitcode=" STRINGIFY(LSAN_ERROR) ":" "exitcode=" STRINGIFY(LSAN_ERROR) ":"
"fast_unwind_on_malloc=0", "fast_unwind_on_malloc=0:"
"symbolize=0",
0); 0);
setenv("UBSAN_OPTIONS", setenv("UBSAN_OPTIONS",

View File

@ -764,7 +764,8 @@ static void set_up_environment(afl_forkserver_t *fsrv) {
setenv("LSAN_OPTIONS", setenv("LSAN_OPTIONS",
"exitcode=" STRINGIFY(LSAN_ERROR) ":" "exitcode=" STRINGIFY(LSAN_ERROR) ":"
"fast_unwind_on_malloc=0", "fast_unwind_on_malloc=0:"
"symbolize=0",
0); 0);
if (get_afl_env("AFL_PRELOAD")) { if (get_afl_env("AFL_PRELOAD")) {