diff options
author | vanhauser-thc <vh@thc.org> | 2023-01-25 13:33:02 +0100 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2023-01-25 13:33:17 +0100 |
commit | c5a84a124c56a9478cf779b5aea7369a4eed07ed (patch) | |
tree | e906f4587cdbfc96b11f1359c6e17aff4f6778c5 /instrumentation/afl-compiler-rt.o.c | |
parent | 16f71bfa24e69722bab32f9f8d06ed522e22d755 (diff) | |
download | afl++-c5a84a124c56a9478cf779b5aea7369a4eed07ed.tar.gz |
fixes
Diffstat (limited to 'instrumentation/afl-compiler-rt.o.c')
-rw-r--r-- | instrumentation/afl-compiler-rt.o.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/instrumentation/afl-compiler-rt.o.c b/instrumentation/afl-compiler-rt.o.c index dcff6a0f..d6d6c38c 100644 --- a/instrumentation/afl-compiler-rt.o.c +++ b/instrumentation/afl-compiler-rt.o.c @@ -149,6 +149,7 @@ u32 __afl_already_initialized_shm; u32 __afl_already_initialized_forkserver; u32 __afl_already_initialized_first; u32 __afl_already_initialized_second; +u32 __afl_already_initialized_early; u32 __afl_already_initialized_init; /* Dummy pipe for area_is_valid() */ @@ -1373,6 +1374,9 @@ __attribute__((constructor(EARLY_FS_PRIO))) void __early_forkserver(void) { __attribute__((constructor(CTOR_PRIO))) void __afl_auto_early(void) { + if (__afl_already_initialized_early) return; + __afl_already_initialized_early = 1; + is_persistent = !!getenv(PERSIST_ENV_VAR); if (getenv("AFL_DISABLE_LLVM_INSTRUMENTATION")) return; @@ -1516,6 +1520,7 @@ void __sanitizer_cov_trace_pc_guard_init(uint32_t *start, uint32_t *stop) { __afl_auto_first(); __afl_auto_second(); + __afl_auto_early(); if (__afl_debug) { |