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

chore: Use a specific non-broken slimcc version. #2718

Merged
merged 1 commit into from
Feb 28, 2024
Merged
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: 6 additions & 0 deletions other/docker/slimcc/creduce.sh
Original file line number Diff line number Diff line change
@@ -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"
20 changes: 18 additions & 2 deletions other/docker/slimcc/slimcc.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
Loading