about summary refs log tree commit diff
path: root/instrumentation/SanitizerCoveragePCGUARD.so.cc
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2023-12-24 11:08:26 +0100
committerGitHub <noreply@github.com>2023-12-24 11:08:26 +0100
commitdcb5bc3fa5b48b316719cb6abab856697dc29bda (patch)
tree71f058cf819e53307ef24c5092b38b72f5b321fe /instrumentation/SanitizerCoveragePCGUARD.so.cc
parent108fb0b29ad1586e668ba23e23a0eb1a13c45c49 (diff)
parentdaaefcddc063b356018c29027494a00bcfc3e240 (diff)
downloadafl++-dcb5bc3fa5b48b316719cb6abab856697dc29bda.tar.gz
Merge pull request #1941 from AFLplusplus/dev
push to stable
Diffstat (limited to 'instrumentation/SanitizerCoveragePCGUARD.so.cc')
-rw-r--r--instrumentation/SanitizerCoveragePCGUARD.so.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/instrumentation/SanitizerCoveragePCGUARD.so.cc b/instrumentation/SanitizerCoveragePCGUARD.so.cc
index 588eb950..1c019d26 100644
--- a/instrumentation/SanitizerCoveragePCGUARD.so.cc
+++ b/instrumentation/SanitizerCoveragePCGUARD.so.cc
@@ -572,7 +572,11 @@ void ModuleSanitizerCoverageAFL::instrumentFunction(
   if (!isInInstrumentList(&F, FMNAME)) return;
   if (F.getName().find(".module_ctor") != std::string::npos)
     return;  // Should not instrument sanitizer init functions.
+#if LLVM_VERSION_MAJOR >= 18
+  if (F.getName().starts_with("__sanitizer_"))
+#else
   if (F.getName().startswith("__sanitizer_"))
+#endif
     return;  // Don't instrument __sanitizer_* callbacks.
   // Don't touch available_externally functions, their actual body is elewhere.
   if (F.getLinkage() == GlobalValue::AvailableExternallyLinkage) return;