From f2b7357ff3efedca53a7cd856469b439c2e547ef Mon Sep 17 00:00:00 2001 From: vanhauser-thc Date: Fri, 9 Feb 2024 13:09:16 +0100 Subject: fixes --- instrumentation/SanitizerCoverageLTO.so.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'instrumentation/SanitizerCoverageLTO.so.cc') diff --git a/instrumentation/SanitizerCoverageLTO.so.cc b/instrumentation/SanitizerCoverageLTO.so.cc index f55aeca2..43c6ca40 100644 --- a/instrumentation/SanitizerCoverageLTO.so.cc +++ b/instrumentation/SanitizerCoverageLTO.so.cc @@ -1673,12 +1673,12 @@ void ModuleSanitizerCoverageLTO::instrumentFunction( inst = inst_save; - } + /* if (debug) + fprintf(stderr, "Next instrumentation (%u-%u=%u %u-%u=%u)\n", inst, + inst_save, inst - inst_save, afl_global_id, save_global, + afl_global_id - save_global);*/ - /* if (debug) - fprintf(stderr, "Next instrumentation (%u-%u=%u %u-%u=%u)\n", inst, - inst_save, inst - inst_save, afl_global_id, save_global, - afl_global_id - save_global);*/ + } for (auto &BB : F) { @@ -1932,8 +1932,9 @@ void ModuleSanitizerCoverageLTO::instrumentFunction( } - // if (shouldInstrumentBlock(F, &BB, DT, PDT, Options)) - // BlocksToInstrument.push_back(&BB); + if (!instrument_ctx) + if (shouldInstrumentBlock(F, &BB, DT, PDT, Options)) + BlocksToInstrument.push_back(&BB); /* for (auto &Inst : BB) { -- cgit 1.4.1