Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libafl_libfuzzer optimization experiment #1903

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions fuzzers/libafl_libfuzzer/builder.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ RUN if which rustup; then rustup self uninstall -y; fi && \
# Download libafl.
RUN git clone https://github.com/AFLplusplus/libafl /libafl && \
cd /libafl && \
git checkout defe9084aed5a80ac32fe9a1f3ff00baf97738c6 && \
git checkout ed4178ecd12636fa054b18d1fc716ac414e90440 && \
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 --profile release-fuzzbench && \
cp ./target/release-fuzzbench/libafl_libfuzzer_runtime.a /usr/lib/libFuzzer.a
env -i CXX=$CXX CC=$CC PATH="/root/.cargo/bin/:$PATH" ./build.sh release-fuzzbench && \
cp ./libFuzzer.a /usr/lib/libFuzzer.a
9 changes: 0 additions & 9 deletions fuzzers/libafl_libfuzzer/fuzzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@ def build():
os.environ['CC'] = 'clang'
os.environ['CXX'] = 'clang++'

# merge all of our lib into a single .o, then pack that into a static lib
subprocess.check_call([
'/usr/bin/ld', '-Ur', '--whole-archive', '/usr/lib/libFuzzer.a', '-o',
'/tmp/libFuzzerMerged.o'
])
subprocess.check_call(['/usr/bin/rm', '/usr/lib/libFuzzer.a'])
subprocess.check_call(
['/usr/bin/ar', 'cr', '/usr/lib/libFuzzer.a', '/tmp/libFuzzerMerged.o'])

os.environ['FUZZER_LIB'] = '/usr/lib/libFuzzer.a'

utils.build_benchmark()
Expand Down
Loading