about summary refs log tree commit diff
diff options
context:
space:
mode:
authorKeno Hassler <40292329+kenohassler@users.noreply.github.com>2023-04-24 17:46:56 +0200
committerKeno Hassler <40292329+kenohassler@users.noreply.github.com>2023-04-24 17:55:58 +0200
commit531380d6ab9d2467d174ae45dcfa64bbf12230c0 (patch)
tree5501f7799bebfe916f60075bed9d3d27014355f3
parent6bd48a48cbed1f923ff0999ea24af1f548c2e2bc (diff)
downloadafl++-531380d6ab9d2467d174ae45dcfa64bbf12230c0.tar.gz
llvm-lto: allow skipping initialization
-rw-r--r--instrumentation/SanitizerCoverageLTO.so.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/instrumentation/SanitizerCoverageLTO.so.cc b/instrumentation/SanitizerCoverageLTO.so.cc
index e41f19b6..42583f9e 100644
--- a/instrumentation/SanitizerCoverageLTO.so.cc
+++ b/instrumentation/SanitizerCoverageLTO.so.cc
@@ -1005,7 +1005,8 @@ bool ModuleSanitizerCoverageLTO::instrumentModule(
   // afl++ START
   if (dFile.is_open()) dFile.close();
 
-  if (!getenv("AFL_LLVM_LTO_DONTWRITEID") || dictionary.size() || map_addr) {
+  if (!getenv("AFL_LLVM_LTO_SKIPINIT") &&
+      (!getenv("AFL_LLVM_LTO_DONTWRITEID") || dictionary.size() || map_addr)) {
 
     // yes we could create our own function, insert it into ctors ...
     // but this would be a pain in the butt ... so we use afl-llvm-rt-lto.o