Skip to content

Commit

Permalink
use JEMALLOC and update
Browse files Browse the repository at this point in the history
  • Loading branch information
tokatoka committed Oct 2, 2023
1 parent 2352d4a commit 3c53c68
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fuzzers/libafl/builder.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RUN apt-get update && \
RUN git clone https://github.com/AFLplusplus/LibAFL /libafl

# Checkout a current commit
RUN cd /libafl && git pull && git checkout 324db072a2f0a25f4e891d8a008a2feff240fb79 || true
RUN cd /libafl && git pull && git checkout b20fda2a4ada2a6462718dc661e139e6c7a29807 || true
# Note that due a nightly bug it is currently fixed to a known version on top!

# Compile libafl.
Expand Down
4 changes: 3 additions & 1 deletion fuzzers/libafl/fuzzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,7 @@ def fuzz(input_corpus, output_corpus, target_binary):
if dictionary_path:
command += (['-x', dictionary_path])
command += (['-o', output_corpus, '-i', input_corpus])
fuzzer_env = os.environ.copy()
fuzzer_env['LD_PRELOAD']='/usr/lib/x86_64-linux-gnu/libjemalloc.so.2'
print(command)
subprocess.check_call(command, cwd=os.environ['OUT'])
subprocess.check_call(command, cwd=os.environ['OUT'], env=fuzzer_env)
2 changes: 2 additions & 0 deletions fuzzers/libafl/runner.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

FROM gcr.io/fuzzbench/base-image

RUN apt install libjemalloc2

# This makes interactive docker runs painless:
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/out"
#ENV AFL_MAP_SIZE=2621440
Expand Down

0 comments on commit 3c53c68

Please sign in to comment.