about summary refs log tree commit diff
path: root/llvm_mode/afl-llvm-lto-instrumentation.so.cc
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-08-02 15:00:49 +0200
committervan Hauser <vh@thc.org>2020-08-02 15:00:49 +0200
commit6041b1c4866d11b443545f5b9d6f17ef5483304c (patch)
treeff77a40930cf82625867e719381548e3c0844cfa /llvm_mode/afl-llvm-lto-instrumentation.so.cc
parent349fed3fcd9ba8dcda7764a439c95071b6a509ce (diff)
downloadafl++-6041b1c4866d11b443545f5b9d6f17ef5483304c.tar.gz
fix LTO document id feature, warnings for INSTRUMENT_FILE
Diffstat (limited to 'llvm_mode/afl-llvm-lto-instrumentation.so.cc')
-rw-r--r--llvm_mode/afl-llvm-lto-instrumentation.so.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm_mode/afl-llvm-lto-instrumentation.so.cc b/llvm_mode/afl-llvm-lto-instrumentation.so.cc
index 430cb0ad..d81b35f4 100644
--- a/llvm_mode/afl-llvm-lto-instrumentation.so.cc
+++ b/llvm_mode/afl-llvm-lto-instrumentation.so.cc
@@ -206,8 +206,8 @@ bool AFLLTOPass::runOnModule(Module &M) {
 
       if (debug)
         fprintf(stderr,
-                "DEBUG: Function %s is not the instrument file listed\n",
-                F.getName().str().c_str());
+                "DEBUG: Function %s is not in a source file that was specified "
+                "in the instrument file list\n", F.getName().str().c_str());
       continue;
 
     }
@@ -660,10 +660,11 @@ bool AFLLTOPass::runOnModule(Module &M) {
 
     }
 
-    if (documentFile) fclose(documentFile);
-
   }
 
+  if (documentFile) fclose(documentFile);
+  documentFile = NULL;
+
   // save highest location ID to global variable
   // do this after each function to fail faster
   if (!be_quiet && afl_global_id > MAP_SIZE &&