diff options
author | Andrea Fioraldi <andreafioraldi@gmail.com> | 2019-08-21 00:40:12 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-21 00:40:12 -0700 |
commit | fcc349467f41b2e7414f925d3ef3bbbdc61bac8a (patch) | |
tree | 161c52778d5e4943f2e106a2acf6667ceab3ba2e /qemu_mode/patches/afl-qemu-cpu-inl.h | |
parent | cc55e5c6d8ead610606649fa5aad39671f55bece (diff) | |
parent | d6beac5235118b251deb18a6579aab85271eaa7b (diff) | |
download | afl++-fcc349467f41b2e7414f925d3ef3bbbdc61bac8a.tar.gz |
Merge pull request #47 from vanhauser-thc/immediates-compcov
compcov levels to enable the instrumentation of only comparisons with immediates
Diffstat (limited to 'qemu_mode/patches/afl-qemu-cpu-inl.h')
-rw-r--r-- | qemu_mode/patches/afl-qemu-cpu-inl.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/qemu_mode/patches/afl-qemu-cpu-inl.h b/qemu_mode/patches/afl-qemu-cpu-inl.h index 86203a5b..d7bb4d25 100644 --- a/qemu_mode/patches/afl-qemu-cpu-inl.h +++ b/qemu_mode/patches/afl-qemu-cpu-inl.h @@ -66,7 +66,7 @@ abi_ulong afl_entry_point, /* ELF entry point (_start) */ afl_start_code, /* .text start pointer */ afl_end_code; /* .text end pointer */ -u8 afl_enable_compcov; +u8 afl_compcov_level; /* Set in the child process in forkserver mode: */ @@ -159,9 +159,14 @@ static void afl_setup(void) { } + /* Maintain for compatibility */ if (getenv("AFL_QEMU_COMPCOV")) { - afl_enable_compcov = 1; + afl_compcov_level = 1; + } + if (getenv("AFL_COMPCOV_LEVEL")) { + + afl_compcov_level = atoi(getenv("AFL_COMPCOV_LEVEL")); } /* pthread_atfork() seems somewhat broken in util/rcu.c, and I'm |