From 701e89bbcd3583c0098a982e5e228c5841173d36 Mon Sep 17 00:00:00 2001 From: vanhauser-thc Date: Thu, 21 Nov 2024 10:39:49 +0100 Subject: [PATCH] fixes --- docs/Changelog.md | 1 + instrumentation/SanitizerCoveragePCGUARD.so.cc | 2 +- test/test-gcc-plugin.sh | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/Changelog.md b/docs/Changelog.md index 0d39f708..13518aae 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -41,6 +41,7 @@ - new compile time variable: `AFL_OPT_LEVEL` to set a specific optimization level, default is `3` - correctly explain how to get the correct map size for large targets + - small fix weird LLVM defines in redhat - code formatting updated to llvm 18 - improved custom_mutators/aflpp/standalone/aflpp-standalone - added custom_mutators/autotokens/standalone/autotokens-standalone diff --git a/instrumentation/SanitizerCoveragePCGUARD.so.cc b/instrumentation/SanitizerCoveragePCGUARD.so.cc index 0919ba35..a9c87094 100644 --- a/instrumentation/SanitizerCoveragePCGUARD.so.cc +++ b/instrumentation/SanitizerCoveragePCGUARD.so.cc @@ -310,7 +310,7 @@ Function *ModuleSanitizerCoverageAFL::CreateInitCallsForSections( Type *PtrTy = PointerType::getUnqual(Ty); std::tie(CtorFunc, std::ignore) = createSanitizerCtorAndInitFunctions( M, CtorName, InitFunctionName, {PtrTy, PtrTy}, {SecStart, SecEnd}); - assert(CtorFunc->getName() == CtorName); + // assert(CtorFunc->getName() == CtorName); if (TargetTriple.supportsCOMDAT()) { diff --git a/test/test-gcc-plugin.sh b/test/test-gcc-plugin.sh index 3690a80a..6f32c8e0 100755 --- a/test/test-gcc-plugin.sh +++ b/test/test-gcc-plugin.sh @@ -19,7 +19,7 @@ test -e ../afl-gcc-fast -a -e ../afl-compiler-rt.o && { } || { $ECHO "$GREEN[+] gcc_plugin instrumentation present and working correctly" TUPLES=`echo 0|AFL_QUIET=1 ../afl-showmap -m ${MEM_LIMIT} -o /dev/null -- ./test-instr.plain.gccpi 2>&1 | grep Captur | awk '{print$3}'` - test "$TUPLES" -gt 1 -a "$TUPLES" -lt 9 && { + test "$TUPLES" -gt 1 -a "$TUPLES" -lt 10 && { $ECHO "$GREEN[+] gcc_plugin run reported $TUPLES instrumented locations which is fine" } || { $ECHO "$RED[!] gcc_plugin instrumentation produces a weird numbers: $TUPLES"