Skip to content

Commit

Permalink
Update libafl_libfuzzer (google#1888)
Browse files Browse the repository at this point in the history
We recently updated libafl_libfuzzer in a lot of ways. This fetches the
current "release" revision and pins the Rust version.
  • Loading branch information
addisoncrump authored Sep 21, 2023
1 parent 9c6a395 commit 7c70037
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions fuzzers/libafl_libfuzzer/builder.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,15 @@ RUN apt-get update && \
# Uninstall old Rust & Install the latest one.
RUN if which rustup; then rustup self uninstall -y; fi && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /rustup.sh && \
sh /rustup.sh --default-toolchain nightly -y && \
sh /rustup.sh --default-toolchain nightly-2023-08-23 -y && \
rm /rustup.sh

# Download libafl.
RUN git clone \
--branch libfuzzer \
https://github.com/AFLplusplus/libafl /libafl && \
RUN git clone https://github.com/AFLplusplus/libafl /libafl && \
cd /libafl && \
git checkout d31f82387d1d233771ff1e13ef7e49cdb508410f && \
git checkout defe9084aed5a80ac32fe9a1f3ff00baf97738c6 && \
unset CFLAGS CXXFLAGS && \
export LIBAFL_EDGES_MAP_SIZE=2621440 && \
cd ./libafl_libfuzzer/libafl_libfuzzer_runtime && \
env -i CXX=$CXX CC=$CC PATH="/root/.cargo/bin/:$PATH" cargo build --release --no-default-features && \
cp ./target/release/libafl_libfuzzer_runtime.a /usr/lib/libFuzzer.a
env -i CXX=$CXX CC=$CC PATH="/root/.cargo/bin/:$PATH" cargo build --profile release-fuzzbench && \
cp ./target/release-fuzzbench/libafl_libfuzzer_runtime.a /usr/lib/libFuzzer.a

0 comments on commit 7c70037

Please sign in to comment.