about summary refs log tree commit diff
path: root/instrumentation/SanitizerCoverageLTO.so.cc
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2023-04-25 08:21:42 +0200
committerGitHub <noreply@github.com>2023-04-25 08:21:42 +0200
commitb66d7f99a790af6f25f815a9d8780c26c63e7686 (patch)
tree5aa9ace34c056b3acbc27c15a2d6a25c5ab82e66 /instrumentation/SanitizerCoverageLTO.so.cc
parent46237c33322bbe92d35436718b37062f5c1a8cb6 (diff)
parent7c3c0b26d1ae477fbae6944c0de18256621e1993 (diff)
downloadafl++-b66d7f99a790af6f25f815a9d8780c26c63e7686.tar.gz
Merge pull request #1713 from kenohassler/wafl-mode
llvm-lto: allow skipping initialisation
Diffstat (limited to 'instrumentation/SanitizerCoverageLTO.so.cc')
-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