From 4538f689ede6743d097c85ded2fdcb4f9663020b Mon Sep 17 00:00:00 2001 From: hexcoder- Date: Tue, 1 Sep 2020 19:51:53 +0200 Subject: split-compares-pass: bugfix add missing instrument_file filtering in some places --- llvm_mode/split-compares-pass.so.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'llvm_mode') diff --git a/llvm_mode/split-compares-pass.so.cc b/llvm_mode/split-compares-pass.so.cc index 2e57a30a..2fb90e5e 100644 --- a/llvm_mode/split-compares-pass.so.cc +++ b/llvm_mode/split-compares-pass.so.cc @@ -356,6 +356,8 @@ bool SplitComparesTransform::simplifyIntSignedness(Module &M) { * all signed compares to icomps vector */ for (auto &F : M) { + if (!isInInstrumentList(&F)) continue; + for (auto &BB : F) { for (auto &IN : BB) { @@ -542,6 +544,8 @@ size_t SplitComparesTransform::splitFPCompares(Module &M) { * functions were executed only these four predicates should exist */ for (auto &F : M) { + if (!isInInstrumentList(&F)) continue; + for (auto &BB : F) { for (auto &IN : BB) { @@ -1052,6 +1056,8 @@ size_t SplitComparesTransform::splitIntCompares(Module &M, unsigned bitw) { * were executed only these four predicates should exist */ for (auto &F : M) { + if (!isInInstrumentList(&F)) continue; + for (auto &BB : F) { for (auto &IN : BB) { -- cgit 1.4.1 From c7255f2e262c74753cb35c6e7535dc2aa0e39769 Mon Sep 17 00:00:00 2001 From: hexcoder- Date: Tue, 1 Sep 2020 18:39:53 +0000 Subject: bugfix for Ubuntu trusty: avoid unknown compiler option --- llvm_mode/GNUmakefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'llvm_mode') diff --git a/llvm_mode/GNUmakefile b/llvm_mode/GNUmakefile index 55c488f9..c14e8b4e 100644 --- a/llvm_mode/GNUmakefile +++ b/llvm_mode/GNUmakefile @@ -217,6 +217,12 @@ ifeq "$(LLVM_LTO)" "1" endif endif +ifeq "$(shell echo 'int main() {return 0; }' | $(CLANG_BIN) -x c - -fdebug-prefix-map=$(CURDIR)=llvm_mode -o .test 2>/dev/null && echo 1 || echo 0 ; rm -f .test )" "1" + AFL_CLANG_DEBUG_PREFIX = -fdebug-prefix-map="$(CURDIR)=llvm_mode" +else + AFL_CLANG_DEBUG_PREFIX = "" +endif + CFLAGS ?= -O3 -funroll-loops -fPIC -D_FORTIFY_SOURCE=2 CFLAGS_SAFE := -Wall -g -Wno-pointer-sign -I ../include/ \ -DAFL_PATH=\"$(HELPER_PATH)\" -DBIN_PATH=\"$(BIN_PATH)\" \ @@ -227,7 +233,7 @@ CFLAGS_SAFE := -Wall -g -Wno-pointer-sign -I ../include/ \ -DAFL_CLANG_LDPATH=\"$(AFL_CLANG_LDPATH)\" \ -DAFL_CLANG_FUSELD=\"$(AFL_CLANG_FUSELD)\" \ -DCLANG_BIN=\"$(CLANG_BIN)\" -DCLANGPP_BIN=\"$(CLANGPP_BIN)\" -DUSE_BINDIR=$(USE_BINDIR) -Wno-unused-function \ - -fdebug-prefix-map="$(CURDIR)=llvm_mode" + $(AFL_CLANG_DEBUG_PREFIX) override CFLAGS += $(CFLAGS_SAFE) ifdef AFL_TRACE_PC -- cgit 1.4.1