add missing laf compare split predicates

This commit is contained in:
vanhauser-thc
2022-07-07 00:34:30 +02:00
parent fc520a2bde
commit e6f27c2645
2 changed files with 20 additions and 4 deletions

View File

@ -38,7 +38,7 @@ RUN echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu jammy main
RUN apt-get update && apt-get full-upgrade -y && \
apt-get -y install --no-install-suggests --no-install-recommends \
gcc-12 g++-12 gcc-12-plugin-dev gdb lcov \
gcc-11 g++-11 gcc-11-plugin-dev gdb lcov \
clang-14 clang-tools-14 libc++1-14 libc++-14-dev \
libc++abi1-14 libc++abi-14-dev libclang1-14 libclang-14-dev \
libclang-common-14-dev libclang-cpp14 libclang-cpp14-dev liblld-14 \
@ -53,8 +53,8 @@ RUN [ "$TARGETPLATFORM" = "linux/amd64" ] && \
RUN rm -rf /var/lib/apt/lists/*
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 0
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 0
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 0
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 0
ENV LLVM_CONFIG=llvm-config-14
ENV AFL_SKIP_CPUFREQ=1
@ -67,7 +67,7 @@ RUN cd /afl-cov && make install && cd ..
COPY . /AFLplusplus
WORKDIR /AFLplusplus
RUN export CC=gcc-12 && export CXX=g++-12 && make clean && \
RUN export CC=gcc-11 && export CXX=g++-11 && make clean && \
make distrib && make install && make clean
RUN sh -c 'echo set encoding=utf-8 > /root/.vimrc'

View File

@ -566,8 +566,16 @@ bool SplitComparesTransform::splitCompare(CmpInst *cmp_inst, Module &M,
case CmpInst::ICMP_NE:
case CmpInst::ICMP_UGT:
case CmpInst::ICMP_ULT:
case CmpInst::ICMP_UGE:
case CmpInst::ICMP_ULE:
case CmpInst::ICMP_SGT:
case CmpInst::ICMP_SLT:
case CmpInst::ICMP_SGE:
case CmpInst::ICMP_SLE:
break;
default:
fprintf(stderr, "Error: split-compare: Unsupported predicate (%u)\n",
pred);
// unsupported predicate!
return false;
@ -581,6 +589,7 @@ bool SplitComparesTransform::splitCompare(CmpInst *cmp_inst, Module &M,
if (!intTyOp0) {
// not an integer type
fprintf(stderr, "Error: split-compare: not an integer type\n");
return false;
}
@ -675,6 +684,12 @@ bool SplitComparesTransform::splitCompare(CmpInst *cmp_inst, Module &M,
}
case CmpInst::ICMP_SGE:
case CmpInst::ICMP_SLE:
case CmpInst::ICMP_SGT:
case CmpInst::ICMP_SLT:
case CmpInst::ICMP_UGE:
case CmpInst::ICMP_ULE:
case CmpInst::ICMP_UGT:
case CmpInst::ICMP_ULT: {
@ -729,6 +744,7 @@ bool SplitComparesTransform::splitCompare(CmpInst *cmp_inst, Module &M,
}
default:
fprintf(stderr, "Error: split-compare: should not happen\n");
return false;
}