Merge pull request #47 from vanhauser-thc/immediates-compcov

compcov levels to enable the instrumentation of only comparisons with immediates
This commit is contained in:
Andrea Fioraldi
2019-08-21 00:40:12 -07:00
committed by GitHub
5 changed files with 71 additions and 15 deletions

View File

@ -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