renamed env var to AFL_DEBUG_CHILD
MODIFY
docs/Changelog.md
docs/Changelog.md
@@ -58,6 +58,7 @@ sending a mail to <afl-users+subscribe@googlegroups.com>.
- added INTROSPECTION support for custom modules
- python fuzz function was not optional, fixed
- unicornafl synced with upstream (arm64 fix, better rust bindings)
+ - renamed AFL_DEBUG_CHILD_OUTPUT to AFL_DEBUG_CHILD
### Version ++2.68c (release)

MODIFY
docs/env_variables.md
docs/env_variables.md
@@ -388,7 +388,7 @@ checks or alter some of the more exotic semantics of the tool:
processing the first queue entry; and `AFL_BENCH_UNTIL_CRASH` causes it to
exit soon after the first crash is found.
- - Setting `AFL_DEBUG_CHILD_OUTPUT` will not suppress the child output.
+ - Setting `AFL_DEBUG_CHILD` will not suppress the child output.
Not pretty but good for debugging purposes.
- Setting `AFL_NO_CPU_RED` will not display very high cpu usages in red color.

MODIFY
examples/afl_network_proxy/afl-network-server.c
examples/afl_network_proxy/afl-network-server.c
@@ -636,8 +636,11 @@ int main(int argc, char **argv_orig, char **envp) {
if (listen(sock, 1) < 0) { PFATAL("listen() failed"); }
- afl_fsrv_start(fsrv, use_argv, &stop_soon,
- get_afl_env("AFL_DEBUG_CHILD_OUTPUT") ? 1 : 0);
+ afl_fsrv_start(
+ fsrv, use_argv, &stop_soon,
+ (get_afl_env("AFL_DEBUG_CHILD") || get_afl_env("AFL_DEBUG_CHILD_OUTPUT"))
+ ? 1
+ : 0);
#ifdef USE_DEFLATE
compressor = libdeflate_alloc_compressor(1);

MODIFY
include/afl-fuzz.h
include/afl-fuzz.h
@@ -362,8 +362,8 @@ typedef struct afl_env_vars {
u8 afl_skip_cpufreq, afl_exit_when_done, afl_no_affinity, afl_skip_bin_check,
afl_dumb_forksrv, afl_import_first, afl_custom_mutator_only, afl_no_ui,
afl_force_ui, afl_i_dont_care_about_missing_crashes, afl_bench_just_one,
- afl_bench_until_crash, afl_debug_child_output, afl_autoresume,
- afl_cal_fast, afl_cycle_schedules, afl_expand_havoc, afl_statsd;
+ afl_bench_until_crash, afl_debug_child, afl_autoresume, afl_cal_fast,
+ afl_cycle_schedules, afl_expand_havoc, afl_statsd;
u8 *afl_tmpdir, *afl_custom_mutator_library, *afl_python_module, *afl_path,
*afl_hang_tmout, *afl_forksrv_init_tmout, *afl_skip_crashes, *afl_preload,

MODIFY
include/envs.h
include/envs.h
@@ -6,6 +6,7 @@ static char *afl_environment_deprecated[] = {
"AFL_LLVM_WHITELIST",
"AFL_GCC_WHITELIST",
+ "AFL_DEBUG_CHILD_OUTPUT",
"AFL_DEFER_FORKSRV",
"AFL_POST_LIBRARY",
"AFL_PERSISTENT",
@@ -36,7 +37,7 @@ static char *afl_environment_variables[] = {
"AFL_CXX",
"AFL_CYCLE_SCHEDULES",
"AFL_DEBUG",
- "AFL_DEBUG_CHILD_OUTPUT",
+ "AFL_DEBUG_CHILD",
"AFL_DEBUG_GDB",
"AFL_DISABLE_TRIM",
"AFL_DONT_OPTIMIZE",

MODIFY
instrumentation/afl-compiler-rt.o.c
instrumentation/afl-compiler-rt.o.c
@@ -992,7 +992,7 @@ void __sanitizer_cov_trace_pc_guard(uint32_t *guard) {
// For stability analysis, if you want to know to which function unstable
// edge IDs belong - uncomment, recompile+install llvm_mode, recompile
// the target. libunwind and libbacktrace are better solutions.
- // Set AFL_DEBUG_CHILD_OUTPUT=1 and run afl-fuzz with 2>file to capture
+ // Set AFL_DEBUG_CHILD=1 and run afl-fuzz with 2>file to capture
// the backtrace output
/*
uint32_t unstable[] = { ... unstable edge IDs };

MODIFY
src/afl-fuzz-run.c
src/afl-fuzz-run.c
@@ -332,7 +332,7 @@ u8 calibrate_case(afl_state_t *afl, struct queue_entry *q, u8 *use_mem,
}
afl_fsrv_start(&afl->fsrv, afl->argv, &afl->stop_soon,
- afl->afl_env.afl_debug_child_output);
+ afl->afl_env.afl_debug_child);
if (afl->fsrv.support_shmem_fuzz && !afl->fsrv.use_shmem_fuzz) {

MODIFY
src/afl-fuzz-state.c
src/afl-fuzz-state.c
@@ -268,11 +268,13 @@ void read_afl_environment(afl_state_t *afl, char **envp) {
afl->afl_env.afl_bench_until_crash =
get_afl_env(afl_environment_variables[i]) ? 1 : 0;
- } else if (!strncmp(env, "AFL_DEBUG_CHILD_OUTPUT",
+ } else if (!strncmp(env, "AFL_DEBUG_CHILD",
+ afl_environment_variable_len) ||
+ !strncmp(env, "AFL_DEBUG_CHILD_OUTPUT",
afl_environment_variable_len)) {
- afl->afl_env.afl_debug_child_output =
+ afl->afl_env.afl_debug_child =
get_afl_env(afl_environment_variables[i]) ? 1 : 0;
} else if (!strncmp(env, "AFL_AUTORESUME",

MODIFY
src/afl-fuzz.c
src/afl-fuzz.c
@@ -166,7 +166,7 @@ static void usage(u8 *argv0, int more_help) {
"AFL_CUSTOM_MUTATOR_ONLY: avoid AFL++'s internal mutators\n"
"AFL_CYCLE_SCHEDULES: after completing a cycle, switch to a different -p schedule\n"
"AFL_DEBUG: extra debugging output for Python mode trimming\n"
- "AFL_DEBUG_CHILD_OUTPUT: do not suppress stdout/stderr from target\n"
+ "AFL_DEBUG_CHILD: do not suppress stdout/stderr from target\n"
"AFL_DISABLE_TRIM: disable the trimming of test cases\n"
"AFL_DUMB_FORKSRV: use fork server without feedback from target\n"
"AFL_EXIT_WHEN_DONE: exit when all inputs are run and no new finds are found\n"
@@ -1426,7 +1426,7 @@ int main(int argc, char **argv_orig, char **envp) {
afl->cmplog_fsrv.cmplog_binary = afl->cmplog_binary;
afl->cmplog_fsrv.init_child_func = cmplog_exec_child;
afl_fsrv_start(&afl->cmplog_fsrv, afl->argv, &afl->stop_soon,
- afl->afl_env.afl_debug_child_output);
+ afl->afl_env.afl_debug_child);
OKF("Cmplog forkserver successfully started");
}

MODIFY
src/afl-showmap.c
src/afl-showmap.c
@@ -1091,7 +1091,11 @@ int main(int argc, char **argv_orig, char **envp) {
}
afl_fsrv_start(fsrv, use_argv, &stop_soon,
- get_afl_env("AFL_DEBUG_CHILD_OUTPUT") ? 1 : 0);
+ (get_afl_env("AFL_DEBUG_CHILD") ||
+ get_afl_env("AFL_DEBUG_CHILD_OUTPUT"))
+ ? 1
+ : 0);
+
map_size = fsrv->map_size;
if (fsrv->support_shmem_fuzz && !fsrv->use_shmem_fuzz)

MODIFY
src/afl-tmin.c
src/afl-tmin.c
@@ -1141,8 +1141,11 @@ int main(int argc, char **argv_orig, char **envp) {
read_initial_file();
- afl_fsrv_start(fsrv, use_argv, &stop_soon,
- get_afl_env("AFL_DEBUG_CHILD_OUTPUT") ? 1 : 0);
+ afl_fsrv_start(
+ fsrv, use_argv, &stop_soon,
+ (get_afl_env("AFL_DEBUG_CHILD") || get_afl_env("AFL_DEBUG_CHILD_OUTPUT"))
+ ? 1
+ : 0);
if (fsrv->support_shmem_fuzz && !fsrv->use_shmem_fuzz)
shm_fuzz = deinit_shmem(fsrv, shm_fuzz);

MODIFY
test/test-unicorn-mode.sh
test/test-unicorn-mode.sh
@@ -7,7 +7,7 @@ test -d ../unicorn_mode/unicornafl -a -e ../unicorn_mode/unicornafl/samples/shel
test -e ../unicorn_mode/samples/simple/simple_target.bin -a -e ../unicorn_mode/samples/compcov_x64/compcov_target.bin && {
{
# We want to see python errors etc. in logs, in case something doesn't work
- export AFL_DEBUG_CHILD_OUTPUT=1
+ export AFL_DEBUG_CHILD=1
# some python version should be available now
PYTHONS="`command -v python3` `command -v python` `command -v python2`"
@@ -34,7 +34,7 @@ test -d ../unicorn_mode/unicornafl -a -e ../unicorn_mode/unicornafl/samples/shel
cd ../unicorn_mode/samples/persistent
make >>errors 2>&1
$ECHO "$GREY[*] running afl-fuzz for unicorn_mode (persistent), this will take approx 25 seconds"
- AFL_DEBUG_CHILD_OUTPUT=1 ../../../afl-fuzz -m none -V25 -U -i sample_inputs -o out -d -- ./harness @@ >>errors 2>&1
+ AFL_DEBUG_CHILD=1 ../../../afl-fuzz -m none -V25 -U -i sample_inputs -o out -d -- ./harness @@ >>errors 2>&1
test -n "$( ls out/default/queue/id:000002* 2>/dev/null )" && {
$ECHO "$GREEN[+] afl-fuzz is working correctly with unicorn_mode (persistent)"
} || {
@@ -96,7 +96,7 @@ test -d ../unicorn_mode/unicornafl -a -e ../unicorn_mode/unicornafl/samples/shel
}
fi
- unset AFL_DEBUG_CHILD_OUTPUT
+ unset AFL_DEBUG_CHILD
}
} || {

renamed env var to AFL_DEBUG_CHILD