From daa2285083a1046ff69e398366a858a2558134fb Mon Sep 17 00:00:00 2001 From: van Hauser Date: Tue, 22 Sep 2020 09:32:16 +0200 Subject: fix LTO autodictionary for ints > 64 bits --- instrumentation/SanitizerCoverageLTO.so.cc | 2 +- instrumentation/afl-llvm-lto-instrumentation.so.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/instrumentation/SanitizerCoverageLTO.so.cc b/instrumentation/SanitizerCoverageLTO.so.cc index 64162145..82e55218 100644 --- a/instrumentation/SanitizerCoverageLTO.so.cc +++ b/instrumentation/SanitizerCoverageLTO.so.cc @@ -526,7 +526,7 @@ bool ModuleSanitizerCoverage::instrumentModule( Value * op = cmpInst->getOperand(1); ConstantInt *ilen = dyn_cast(op); - if (ilen) { + if (ilen && ilen->uge(0xffffffffffffffff) == false) { u64 val2 = 0, val = ilen->getZExtValue(); u32 len = 0; diff --git a/instrumentation/afl-llvm-lto-instrumentation.so.cc b/instrumentation/afl-llvm-lto-instrumentation.so.cc index 2f936c29..9e026e57 100644 --- a/instrumentation/afl-llvm-lto-instrumentation.so.cc +++ b/instrumentation/afl-llvm-lto-instrumentation.so.cc @@ -293,7 +293,7 @@ bool AFLLTOPass::runOnModule(Module &M) { Value * op = cmpInst->getOperand(1); ConstantInt *ilen = dyn_cast(op); - if (ilen) { + if (ilen && ilen->uge(0xffffffffffffffff) == false) { u64 val2 = 0, val = ilen->getZExtValue(); u32 len = 0; -- cgit 1.4.1