fix LTO selective instrumentation
MODIFY
docs/Changelog.md
docs/Changelog.md
@@ -17,8 +17,10 @@ sending a mail to <afl-users+subscribe@googlegroups.com>.
- fix cmplog rtn (rare crash and not being able to gather ptr data)
- link runtime not to shared libs
- ensure shared libraries are properly built and instrumented
+ - AFL_LLVM_INSTRUMENT_ALLOW/DENY were not implemented for LTO, added
- show correct LLVM PCGUARD NATIVE mode when auto switching to it
and keep fsanitize-coverage-*list=...
+ Short mnemnonic NATIVE is now also accepted.
- qemu_mode (thanks @realmadsci):
- move AFL_PRELOAD and AFL_USE_QASAN logic inside afl-qemu-trace
- add AFL_QEMU_CUSTOM_BIN

MODIFY
instrumentation/SanitizerCoverageLTO.so.cc
instrumentation/SanitizerCoverageLTO.so.cc
@@ -507,6 +507,7 @@ bool ModuleSanitizerCoverage::instrumentModule(
Zero = ConstantInt::get(Int8Tyi, 0);
One = ConstantInt::get(Int8Tyi, 1);
+ initInstrumentList();
scanForDangerousFunctions(&M);
Mo = &M;
@@ -1229,7 +1230,7 @@ void ModuleSanitizerCoverage::instrumentFunction(
// afl++ START
if (!F.size()) return;
- if (isIgnoreFunction(&F)) return;
+ if (!isInInstrumentList(&F)) return;
// afl++ END
if (Options.CoverageType >= SanitizerCoverageOptions::SCK_Edge)

fix LTO selective instrumentation