Skip to content

Commit f242682

Browse files
authored
Merge pull request ruby#3733 from stevenjohnstone/bug/3730
Fix fuzzing builds
2 parents 3340d87 + 545e7f2 commit f242682

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ build/fuzz.%: $(SOURCES) fuzz/%.c fuzz/fuzz.c
6363
$(ECHO) "building $* fuzzer"
6464
$(Q) $(MAKEDIRS) $(@D)
6565
$(ECHO) "building main fuzz binary"
66-
$(Q) AFL_HARDEN=1 afl-clang-lto $(DEBUG_FLAGS) $(CPPFLAGS) $(CFLAGS) $(FUZZ_FLAGS) -O0 -fsanitize-ignorelist=fuzz/asan.ignore -fsanitize=fuzzer,address -ggdb3 -std=c99 -Iinclude -o $@ $^
66+
$(Q) afl-clang-lto $(DEBUG_FLAGS) $(CPPFLAGS) $(CFLAGS) $(FUZZ_FLAGS) -O0 -fsanitize-ignorelist=fuzz/asan.ignore -fsanitize=fuzzer,address -ggdb3 -std=c99 -Iinclude -o $@ $^
6767
$(ECHO) "building cmplog binary"
68-
$(Q) AFL_HARDEN=1 AFL_LLVM_CMPLOG=1 afl-clang-lto $(DEBUG_FLAGS) $(CPPFLAGS) $(CFLAGS) $(FUZZ_FLAGS) -O0 -fsanitize-ignorelist=fuzz/asan.ignore -fsanitize=fuzzer,address -ggdb3 -std=c99 -Iinclude -o $@.cmplog $^
68+
$(Q) AFL_LLVM_CMPLOG=1 afl-clang-lto $(DEBUG_FLAGS) $(CPPFLAGS) $(CFLAGS) $(FUZZ_FLAGS) -O0 -fsanitize-ignorelist=fuzz/asan.ignore -fsanitize=fuzzer,address -ggdb3 -std=c99 -Iinclude -o $@.cmplog $^
6969

7070
build/fuzz.heisenbug.%: $(SOURCES) fuzz/%.c fuzz/heisenbug.c
71-
$(Q) AFL_HARDEN=1 afl-clang-lto $(DEBUG_FLAGS) $(CPPFLAGS) $(CFLAGS) $(FUZZ_FLAGS) -O0 -fsanitize-ignorelist=fuzz/asan.ignore -fsanitize=fuzzer,address -ggdb3 -std=c99 -Iinclude -o $@ $^
71+
$(Q) afl-clang-lto $(DEBUG_FLAGS) $(CPPFLAGS) $(CFLAGS) $(FUZZ_FLAGS) -O0 -fsanitize-ignorelist=fuzz/asan.ignore -fsanitize=fuzzer,address -ggdb3 -std=c99 -Iinclude -o $@ $^
7272

7373
fuzz-debug:
7474
$(ECHO) "entering debug shell"

fuzz/docker/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
FROM aflplusplus/aflplusplus
1+
FROM aflplusplus/aflplusplus:v4.32c
22

33
ARG USERNAME=prism
44
ARG USER_UID=1000
55
ARG USER_GID=$USER_UID
6+
ARG RUBY_VERSION=3.3.10
67
ENV MAKEFLAGS=-j8
78

89
RUN groupadd --gid $USER_GID $USERNAME \
@@ -12,10 +13,10 @@ RUN groupadd --gid $USER_GID $USERNAME \
1213
&& chmod 0440 /etc/sudoers.d/$USERNAME
1314

1415

15-
RUN wget https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.2.tar.gz
16-
RUN tar -xvf ruby-3.2.2.tar.gz
16+
RUN wget https://cache.ruby-lang.org/pub/ruby/3.3/ruby-${RUBY_VERSION}.tar.gz -O ruby.tar.gz
17+
RUN mkdir ruby-source && tar -xvf ruby.tar.gz -C ruby-source --strip-components=1
1718
RUN apt update && apt -y install libyaml-dev libz-dev libssl-dev
18-
RUN cd ruby-3.2.2 && ./configure --disable-install-doc && make && make install
19+
RUN cd ruby-source && ./configure --disable-install-doc && make && make install
1920
RUN gem install rake-compiler ruby_memcheck
2021
RUN git clone https://github.com/pwndbg/pwndbg && cd pwndbg && ./setup.sh
2122
ENV LC_CTYPE=C.UTF-8

0 commit comments

Comments
 (0)