chore: Use a specific non-broken slimcc version.

7b7c98604a broke it.
pull/1660/head
iphydf 2024-02-28 15:30:55 +00:00
parent d7f21010a1
commit ed2b60c217
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9
2 changed files with 24 additions and 2 deletions

6
other/docker/slimcc/creduce.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
if ! gcc -I/work/c-toxcore/toxcore -fsyntax-only crash.c; then
exit 1
fi
/work/slimcc/slimcc -I/work/c-toxcore/toxcore -c crash.c 2>&1 | grep "file_exists: Assertion"

View File

@ -15,12 +15,28 @@ RUN apt-get update && \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Uncomment this to find bugs in slimcc using creduce.
#RUN apt-get update && \
# DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
# creduce \
# && apt-get clean \
# && rm -rf /var/lib/apt/lists/*
WORKDIR /work/slimcc
RUN ["git", "clone", "--depth=1", "https://github.com/fuhsnn/slimcc", "/work/slimcc"]
RUN ["make", "CFLAGS=-O3"]
RUN ["git", "clone", "https://github.com/fuhsnn/slimcc", "/work/slimcc"]
# Comment this to checkout master (e.g. to find bugs using creduce).
RUN ["git", "checkout", "ac9ddf4d39642e6b4880b1a73e19c6f2769d857e"]
RUN ["make", "CFLAGS=-O3", "-j4"]
WORKDIR /work/c-toxcore
COPY --from=sources /src/ /work/c-toxcore
# Uncomment this to find bugs in slimcc using creduce.
#COPY other/docker/slimcc/creduce.sh /work/c-toxcore/other/docker/slimcc/
#RUN cp toxcore/ccompat.h crash.c \
# && other/docker/slimcc/creduce.sh \
# && creduce other/docker/slimcc/creduce.sh crash.c
COPY other/docker/slimcc/Makefile /work/c-toxcore/
RUN ["make"]