about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Dockerfile5
-rw-r--r--instrumentation/split-compares-pass.so.cc11
2 files changed, 11 insertions, 5 deletions
diff --git a/Dockerfile b/Dockerfile
index 610c664d..6246148f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,8 @@
 #
 # This Dockerfile for AFLplusplus uses Ubuntu 22.04 jammy and
-# installs LLVM 14 for afl-clang-lto support :-)
+# installs LLVM 14 for afl-clang-lto support.
+#
+# GCC 11 is used instead of 12 because genhtml for afl-cov doesn't like it.
 #
 
 FROM ubuntu:22.04 AS aflplusplus
@@ -25,6 +27,7 @@ RUN apt-get update && \
     libglib2.0-dev \
     wget vim jupp nano bash-completion less \
     apt-utils apt-transport-https ca-certificates gnupg dialog \
+    joe vim ssh \
     libpixman-1-dev \
     gnuplot-nox \
     && rm -rf /var/lib/apt/lists/*
diff --git a/instrumentation/split-compares-pass.so.cc b/instrumentation/split-compares-pass.so.cc
index e069cabe..375de065 100644
--- a/instrumentation/split-compares-pass.so.cc
+++ b/instrumentation/split-compares-pass.so.cc
@@ -574,8 +574,9 @@ bool SplitComparesTransform::splitCompare(CmpInst *cmp_inst, Module &M,
     case CmpInst::ICMP_SLE:
       break;
     default:
-      fprintf(stderr, "Error: split-compare: Unsupported predicate (%u)\n",
-              pred);
+      if (!be_quiet)
+        fprintf(stderr, "Error: split-compare: Unsupported predicate (%u)\n",
+                pred);
       // unsupported predicate!
       return false;
 
@@ -702,7 +703,8 @@ bool SplitComparesTransform::splitCompare(CmpInst *cmp_inst, Module &M,
       CmpInst *    icmp_inv_cmp = nullptr;
       BasicBlock * inv_cmp_bb =
           BasicBlock::Create(C, "inv_cmp", end_bb->getParent(), end_bb);
-      if (pred == CmpInst::ICMP_UGT) {
+      if (pred == CmpInst::ICMP_UGT || pred == CmpInst::ICMP_SGT ||
+          pred == CmpInst::ICMP_UGE || pred == CmpInst::ICMP_SGE) {
 
         icmp_inv_cmp = CmpInst::Create(Instruction::ICmp, CmpInst::ICMP_ULT,
                                        op0_high, op1_high);
@@ -744,7 +746,8 @@ bool SplitComparesTransform::splitCompare(CmpInst *cmp_inst, Module &M,
     }
 
     default:
-      fprintf(stderr, "Error: split-compare: should not happen\n");
+      if (!be_quiet)
+        fprintf(stderr, "Error: split-compare: should not happen\n");
       return false;
 
   }