Skip to content

Commit ed2b60c

Browse files
committed
chore: Use a specific non-broken slimcc version.
fuhsnn/slimcc@7b7c986 broke it.
1 parent d7f2101 commit ed2b60c

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

other/docker/slimcc/creduce.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
3+
if ! gcc -I/work/c-toxcore/toxcore -fsyntax-only crash.c; then
4+
exit 1
5+
fi
6+
/work/slimcc/slimcc -I/work/c-toxcore/toxcore -c crash.c 2>&1 | grep "file_exists: Assertion"

other/docker/slimcc/slimcc.Dockerfile

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,28 @@ RUN apt-get update && \
1515
&& apt-get clean \
1616
&& rm -rf /var/lib/apt/lists/*
1717

18+
# Uncomment this to find bugs in slimcc using creduce.
19+
#RUN apt-get update && \
20+
# DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
21+
# creduce \
22+
# && apt-get clean \
23+
# && rm -rf /var/lib/apt/lists/*
24+
1825
WORKDIR /work/slimcc
19-
RUN ["git", "clone", "--depth=1", "https://github.com/fuhsnn/slimcc", "/work/slimcc"]
20-
RUN ["make", "CFLAGS=-O3"]
26+
RUN ["git", "clone", "https://github.com/fuhsnn/slimcc", "/work/slimcc"]
27+
# Comment this to checkout master (e.g. to find bugs using creduce).
28+
RUN ["git", "checkout", "ac9ddf4d39642e6b4880b1a73e19c6f2769d857e"]
29+
RUN ["make", "CFLAGS=-O3", "-j4"]
2130

2231
WORKDIR /work/c-toxcore
2332
COPY --from=sources /src/ /work/c-toxcore
33+
34+
# Uncomment this to find bugs in slimcc using creduce.
35+
#COPY other/docker/slimcc/creduce.sh /work/c-toxcore/other/docker/slimcc/
36+
#RUN cp toxcore/ccompat.h crash.c \
37+
# && other/docker/slimcc/creduce.sh \
38+
# && creduce other/docker/slimcc/creduce.sh crash.c
39+
2440
COPY other/docker/slimcc/Makefile /work/c-toxcore/
2541
RUN ["make"]
2642

0 commit comments

Comments
 (0)