diff options
author | van Hauser <vh@thc.org> | 2021-12-14 22:10:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-14 22:10:19 +0100 |
commit | 02fba1cc7e8709c8e0961454136a64f373e4f9ff (patch) | |
tree | 4268feaff62895b2a2ef2b793c36534f5771bda5 /instrumentation/afl-llvm-common.cc | |
parent | 22e2362f0fd5685548696f487639104a0059e3eb (diff) | |
parent | 2564eb6f8c8ed49b0ec30e1e297ad93067e8f1f2 (diff) | |
download | afl++-02fba1cc7e8709c8e0961454136a64f373e4f9ff.tar.gz |
Merge pull request #1215 from AFLplusplus/dev
Push to stable
Diffstat (limited to 'instrumentation/afl-llvm-common.cc')
-rw-r--r-- | instrumentation/afl-llvm-common.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/instrumentation/afl-llvm-common.cc b/instrumentation/afl-llvm-common.cc index e5e367a7..9483da83 100644 --- a/instrumentation/afl-llvm-common.cc +++ b/instrumentation/afl-llvm-common.cc @@ -401,7 +401,7 @@ static std::string getSourceName(llvm::Function *F) { } -bool isInInstrumentList(llvm::Function *F) { +bool isInInstrumentList(llvm::Function *F, std::string Filename) { bool return_default = true; @@ -448,6 +448,8 @@ bool isInInstrumentList(llvm::Function *F) { std::string source_file = getSourceName(F); + if (source_file.empty()) { source_file = Filename; } + if (!source_file.empty()) { for (std::list<std::string>::iterator it = denyListFiles.begin(); @@ -478,7 +480,7 @@ bool isInInstrumentList(llvm::Function *F) { if (!be_quiet) WARNF( "No debug information found for function %s, will be " - "instrumented (recompile with -g -O[1-3]).", + "instrumented (recompile with -g -O[1-3] and use a modern llvm).", F->getName().str().c_str()); } @@ -528,6 +530,8 @@ bool isInInstrumentList(llvm::Function *F) { std::string source_file = getSourceName(F); + if (source_file.empty()) { source_file = Filename; } + if (!source_file.empty()) { for (std::list<std::string>::iterator it = allowListFiles.begin(); @@ -563,7 +567,7 @@ bool isInInstrumentList(llvm::Function *F) { if (!be_quiet) WARNF( "No debug information found for function %s, will not be " - "instrumented (recompile with -g -O[1-3]).", + "instrumented (recompile with -g -O[1-3] and use a modern llvm).", F->getName().str().c_str()); return false; |