diff options
author | van Hauser <vh@thc.org> | 2020-08-13 18:24:36 +0200 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-08-13 18:24:36 +0200 |
commit | 8e984c2aa0100e6244fe6f215c88dd8b3bf3abc2 (patch) | |
tree | 0644d9d8e5c245e60efeb72085c827b034f18e63 | |
parent | 7f435ec5f11341dca4371a7954eee4e3ea83886e (diff) | |
download | afl++-8e984c2aa0100e6244fe6f215c88dd8b3bf3abc2.tar.gz |
fix for sancov
-rw-r--r-- | llvm_mode/afl-llvm-common.cc | 3 | ||||
-rw-r--r-- | llvm_mode/afl-llvm-rt.o.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/llvm_mode/afl-llvm-common.cc b/llvm_mode/afl-llvm-common.cc index da01b094..4b864cf7 100644 --- a/llvm_mode/afl-llvm-common.cc +++ b/llvm_mode/afl-llvm-common.cc @@ -387,7 +387,8 @@ bool isInInstrumentList(llvm::Function *F) { bool return_default = true; // is this a function with code? If it is external we don't instrument it - // anyway and it can't be in the instrument file list. Or if it is it is ignored. + // anyway and it can't be in the instrument file list. Or if it is it is + // ignored. if (!F->size() || isIgnoreFunction(F)) return false; if (!denyListFiles.empty() || !denyListFunctions.empty()) { diff --git a/llvm_mode/afl-llvm-rt.o.c b/llvm_mode/afl-llvm-rt.o.c index 78e1c160..99012ee1 100644 --- a/llvm_mode/afl-llvm-rt.o.c +++ b/llvm_mode/afl-llvm-rt.o.c @@ -64,6 +64,8 @@ #endif #endif +#define CTOR_PRIO 3 + #include <sys/mman.h> #include <fcntl.h> @@ -881,7 +883,7 @@ __attribute__((constructor())) void __afl_auto_init(void) { /* Initialization of the shmem - earliest possible because of LTO fixed mem. */ -__attribute__((constructor(0))) void __afl_auto_early(void) { +__attribute__((constructor(CTOR_PRIO))) void __afl_auto_early(void) { if (getenv("AFL_DISABLE_LLVM_INSTRUMENTATION")) return; |