From 6041b1c4866d11b443545f5b9d6f17ef5483304c Mon Sep 17 00:00:00 2001 From: van Hauser Date: Sun, 2 Aug 2020 15:00:49 +0200 Subject: fix LTO document id feature, warnings for INSTRUMENT_FILE --- llvm_mode/afl-llvm-lto-instrumentation.so.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'llvm_mode/afl-llvm-lto-instrumentation.so.cc') 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 && -- cgit 1.4.1