Last active
September 12, 2022 15:02
-
-
Save barrbrain/3e2fe3dc4a45da7e1e61813fa5ab0077 to your computer and use it in GitHub Desktop.
rav1e fuzzer dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM rustlang/rust:nightly-bullseye | |
RUN apt update \ | |
&& apt install -y clang-13 nasm ninja-build python3-pip \ | |
&& apt clean | |
RUN pip3 install meson \ | |
&& rm -fr /root/.cache | |
RUN cargo install cargo-fuzz --version=0.11.0 | |
RUN GIT_SSL_NO_VERIFY=1 git clone --depth=1 -b 1.0.0 https://code.videolan.org/videolan/dav1d.git \ | |
&& mkdir dav1d/build \ | |
&& cd dav1d/build \ | |
&& CC=clang-13 meson .. -Denable_tests=false -Denable_asm=false \ | |
-Denable_tools=false -Dfuzzing_engine=libfuzzer \ | |
-Db_lundef=false -Ddefault_library=static -Dbuildtype=debugoptimized \ | |
-Dlogging=false -Dfuzzer_ldflags=-fsanitize=fuzzer \ | |
&& ninja install \ | |
&& cd ../.. \ | |
&& rm -fr dav1d | |
ENV CARGO_PROFILE_RELEASE_LTO="true" | |
ENV CARGO_PROFILE_RELEASE_CODEGEN_UNITS="1" | |
ENV RUSTFLAGS="-C target-cpu=x86-64-v3" | |
ENV PKG_CONFIG_ALL_STATIC="1" | |
# docker run -it --rm -v $HOME/rav1e:/rav1e localhost/fuzzit-rav1e /bin/bash | |
# cargo fuzz build -snone --release encode_decode |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment