code format and not setting sanitizers if debug and settings present
MODIFY
src/afl-forkserver.c
src/afl-forkserver.c
@@ -484,6 +484,7 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
/* Set sane defaults for ASAN if nothing else specified. */
+ if (!afl->debug || !getenv("ASAN_OPTIONS"))
setenv("ASAN_OPTIONS",
"abort_on_error=1:"
"detect_leaks=0:"
@@ -499,6 +500,7 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
/* Set sane defaults for UBSAN if nothing else specified. */
+ if (!afl->debug || !getenv("UBSAN_OPTIONS"))
setenv("UBSAN_OPTIONS",
"halt_on_error=1:"
"abort_on_error=1:"
@@ -515,6 +517,7 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
/* MSAN is tricky, because it doesn't support abort_on_error=1 at this
point. So, we do this in a very hacky way. */
+ if (!afl->debug || !getenv("MSAN_OPTIONS"))
setenv("MSAN_OPTIONS",
"exit_code=" STRINGIFY(MSAN_ERROR) ":"
"symbolize=0:"

MODIFY
src/afl-fuzz-bitmap.c
src/afl-fuzz-bitmap.c
@@ -700,11 +700,7 @@ save_if_interesting(afl_state_t *afl, void *mem, u32 len, u8 fault) {
if (likely(!afl->non_instrumented_mode)) {
- if (!classified) {
-
- classify_counts(&afl->fsrv);
-
- }
+ if (!classified) { classify_counts(&afl->fsrv); }
simplify_trace(afl, afl->fsrv.trace_bits);

MODIFY
src/afl-fuzz-stats.c
src/afl-fuzz-stats.c
@@ -60,8 +60,10 @@ void write_setup_file(afl_state_t *afl, u32 argc, char **argv) {
if (i) fprintf(f, " ");
#ifdef __ANDROID__
if (memchr(argv[i], '\'', sizeof(argv[i]))) {
+
#else
if (index(argv[i], '\'')) {
+
#endif
fprintf(f, "'");

MODIFY
src/afl-fuzz.c
src/afl-fuzz.c
@@ -123,7 +123,8 @@ static void usage(u8 *argv0, int more_help) {
"it.\n"
" if using QEMU, just use -c 0.\n"
" -l cmplog_level - set the complexity/intensivity of CmpLog.\n"
- " Values: 1 (integer+string), 2 (+FP) and 3 (+transform)\n\n"
+ " Values: 1 (integer+string), 2 (+FP) and 3 "
+ "(+transform)\n\n"
"Fuzzing behavior settings:\n"
" -Z - sequential queue selection instead of weighted "
@@ -584,7 +585,8 @@ int main(int argc, char **argv_orig, char **envp) {
if (afl->timeout_given) { FATAL("Multiple -t options not supported"); }
- if (!optarg || sscanf(optarg, "%u%c", &afl->fsrv.exec_tmout, &suffix) < 1 ||
+ if (!optarg ||
+ sscanf(optarg, "%u%c", &afl->fsrv.exec_tmout, &suffix) < 1 ||
optarg[0] == '-') {
FATAL("Bad syntax used for -t");
@@ -766,7 +768,8 @@ int main(int argc, char **argv_orig, char **envp) {
case 'V': {
afl->most_time_key = 1;
- if (!optarg || sscanf(optarg, "%llu", &afl->most_time) < 1 || optarg[0] == '-') {
+ if (!optarg || sscanf(optarg, "%llu", &afl->most_time) < 1 ||
+ optarg[0] == '-') {
FATAL("Bad syntax used for -V");
@@ -777,7 +780,8 @@ int main(int argc, char **argv_orig, char **envp) {
case 'E': {
afl->most_execs_key = 1;
- if (!optarg || sscanf(optarg, "%llu", &afl->most_execs) < 1 || optarg[0] == '-') {
+ if (!optarg || sscanf(optarg, "%llu", &afl->most_execs) < 1 ||
+ optarg[0] == '-') {
FATAL("Bad syntax used for -E");

code format and not setting sanitizers if debug and settings present