mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-10 09:11:34 +00:00
whitelist wildcard for LTO
This commit is contained in:
parent
255594ba3a
commit
2ce243bc6e
@ -24,6 +24,7 @@ sending a mail to <afl-users+subscribe@googlegroups.com>.
|
||||
feature is used.
|
||||
- lowered minimum required llvm version to 3.4 (except LLVMInsTrim,
|
||||
which needs 3.8.0)
|
||||
- WHITELIST feature now supports wildcards (thanks to sirmc)
|
||||
- small change to cmplog to make it work with current llvm 11-dev
|
||||
- added AFL_LLVM_LAF_ALL, sets all laf-intel settings
|
||||
- LTO whitelist functionality rewritten, now main, _init etc functions
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <sys/time.h>
|
||||
#include <fnmatch.h>
|
||||
|
||||
#include "llvm/IR/DebugInfo.h"
|
||||
#include "llvm/IR/BasicBlock.h"
|
||||
@ -175,9 +176,8 @@ bool AFLwhitelist::runOnModule(Module &M) {
|
||||
* specified in the list. */
|
||||
if (instFilename.str().length() >= it->length()) {
|
||||
|
||||
if (instFilename.str().compare(
|
||||
instFilename.str().length() - it->length(), it->length(),
|
||||
*it) == 0) {
|
||||
if (fnmatch(("*" + *it).c_str(), instFilename.str().c_str(), 0) ==
|
||||
0) {
|
||||
|
||||
instrumentFunction = true;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user