From 8a216ada9d6e15730730e7ef005cf6a688049441 Mon Sep 17 00:00:00 2001 From: Dan Blackwell Date: Fri, 2 Aug 2024 19:11:30 +0100 Subject: [PATCH] Add -simplifycfg-branch-fold-threshold=0 flag to elminate LLVMs select instructions (cmov) optimisations. This gives extra coverage checkpoint in && chained conditionals --- src/project.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/project.rs b/src/project.rs index 3bcc37e..63a3113 100644 --- a/src/project.rs +++ b/src/project.rs @@ -168,7 +168,8 @@ impl FuzzProject { let mut rustflags: String = "-Cpasses=sancov-module \ -Cllvm-args=-sanitizer-coverage-level=4 \ -Cllvm-args=-sanitizer-coverage-inline-8bit-counters \ - -Cllvm-args=-sanitizer-coverage-pc-table" + -Cllvm-args=-sanitizer-coverage-pc-table \ + -Cllvm-args=-simplifycfg-branch-fold-threshold=0" .to_owned(); if !build.no_trace_compares {