set class afl instrumentation if llvm <= 6

This commit is contained in:
van Hauser
2020-06-16 15:59:09 +02:00
parent bac2da8669
commit e5dcaa818e
2 changed files with 11 additions and 9 deletions

View File

@ -24,10 +24,10 @@ sending a mail to <afl-users+subscribe@googlegroups.com>.
- fix/update to MOpt (thanks to arnow117) - fix/update to MOpt (thanks to arnow117)
- added MOpt dictionary support from repo - added MOpt dictionary support from repo
- llvm_mode: - llvm_mode:
- the default instrumentation is now PCGUARD, as it is faster and provides - the default instrumentation is now PCGUARD if the llvm version is >= 7,
better coverage. The original afl instrumentation can be set via as it is faster and provides better coverage. The original afl
AFL_LLVM_INSTRUMENT=AFL. This is automatically done when the WHITELIST instrumentation can be set via AFL_LLVM_INSTRUMENT=AFL. This is
feature is used. automatically done when the WHITELIST feature is used.
- some targets want a ld variant for LD that is not gcc/clang but ld, - some targets want a ld variant for LD that is not gcc/clang but ld,
added afl-ld-lto to solve this added afl-ld-lto to solve this
- lowered minimum required llvm version to 3.4 (except LLVMInsTrim, which - lowered minimum required llvm version to 3.4 (except LLVMInsTrim, which

View File

@ -757,12 +757,14 @@ int main(int argc, char **argv, char **envp) {
if (instrument_mode == 0) { if (instrument_mode == 0) {
#ifndef USE_TRACE_PC #if LLVM_VERSION_MAJOR <= 6
if (getenv("AFL_LLVM_WHITELIST")) instrument_mode = INSTRUMENT_AFL;
instrument_mode = INSTRUMENT_AFL; #else
else if (getenv("AFL_LLVM_WHITELIST"))
instrument_mode = INSTRUMENT_AFL;
else
instrument_mode = INSTRUMENT_PCGUARD;
#endif #endif
instrument_mode = INSTRUMENT_PCGUARD;
} }