From e5972efa41c6371a6d1fed14492418ad0a756eae Mon Sep 17 00:00:00 2001 From: Andrea Fioraldi Date: Thu, 6 Feb 2020 21:43:50 +0100 Subject: cmplog for qemu mode --- src/afl-fuzz-cmplog.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/afl-fuzz-cmplog.c') diff --git a/src/afl-fuzz-cmplog.c b/src/afl-fuzz-cmplog.c index 92bac4ab..69efcffa 100644 --- a/src/afl-fuzz-cmplog.c +++ b/src/afl-fuzz-cmplog.c @@ -150,8 +150,10 @@ void init_cmplog_forkserver(char** argv) { "msan_track_origins=0", 0); - argv[0] = cmplog_binary; - execv(cmplog_binary, argv); + setenv("___AFL_EINS_ZWEI_POLIZEI___", "1", 1); + + if (!qemu_mode) argv[0] = cmplog_binary; + execv(argv[0], argv); /* Use a distinctive bitmap signature to tell the parent about execv() falling through. */ @@ -440,9 +442,11 @@ u8 run_cmplog_target(char** argv, u32 timeout) { setenv("MSAN_OPTIONS", "exit_code=" STRINGIFY(MSAN_ERROR) ":" "symbolize=0:" "msan_track_origins=0", 0); + + setenv("___AFL_EINS_ZWEI_POLIZEI___", "1", 1); - argv[0] = cmplog_binary; - execv(cmplog_binary, argv); + if (!qemu_mode) argv[0] = cmplog_binary; + execv(argv[0], argv); /* Use a distinctive bitmap value to tell the parent about execv() falling through. */ -- cgit 1.4.1