Skip to content

Commit 5710ec1

Browse files
authored
switch to clang 9 in the github action (simdjson#695)
The upstream convenience script from llvm does not support installing clang 8 anymore.
1 parent fa637fc commit 5710ec1

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

.github/workflows/fuzzers.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
sudo apt-get install --quiet ninja-build valgrind zip unzip
2424
wget https://apt.llvm.org/llvm.sh
2525
chmod +x llvm.sh
26-
sudo ./llvm.sh 8
26+
sudo ./llvm.sh 9
2727
2828
- uses: actions/checkout@v1
2929
- name: Create and prepare the initial seed corpus
@@ -55,7 +55,7 @@ jobs:
5555
run: |
5656
for fuzzer in $allfuzzers; do
5757
mkdir -p out/$fuzzer # in case this is a new fuzzer, or corpus.tar is broken
58-
build-ossfuzz-fast8/fuzz/fuzz_$fuzzer out/$fuzzer -max_total_time=30 $artifactsprefix || touch failed
58+
build-ossfuzz-fast9/fuzz/fuzz_$fuzzer out/$fuzzer -max_total_time=30 $artifactsprefix || touch failed
5959
# make sure the failing output is visible in the log
6060
if [ -e failed ] ; then
6161
ls fuzzfailure/* |xargs -n1 base64
@@ -68,22 +68,22 @@ jobs:
6868
for fuzzer in $allfuzzers; do
6969
build-ossfuzz-withavx/fuzz/fuzz_$fuzzer out/$fuzzer -max_total_time=20 $artifactsprefix || touch failed
7070
build-ossfuzz-noavx/fuzz/fuzz_$fuzzer out/$fuzzer -max_total_time=10 $artifactsprefix || touch failed
71-
build-ossfuzz-noavx8/fuzz/fuzz_$fuzzer out/$fuzzer -max_total_time=10 $artifactsprefix || touch failed
71+
build-ossfuzz-noavx9/fuzz/fuzz_$fuzzer out/$fuzzer -max_total_time=10 $artifactsprefix || touch failed
7272
if [ -e failed ] ; then
7373
# make sure the failing output is visible in the log
7474
ls fuzzfailure/* |xargs -n1 base64
7575
exit 1
7676
fi
7777
echo disable msan runs, it fails inside the fuzzing engine and not the fuzzed code!
78-
echo build-ossfuzz-msan-noavx8/fuzz/fuzz_$fuzzer out/$fuzzer -max_total_time=10 -reload=0 $artifactsprefix
79-
echo build-ossfuzz-msan-withavx8/fuzz/fuzz_$fuzzer out/$fuzzer -max_total_time=10 -reload=0 $artifactsprefix
78+
echo build-ossfuzz-msan-noavx9/fuzz/fuzz_$fuzzer out/$fuzzer -max_total_time=10 -reload=0 $artifactsprefix
79+
echo build-ossfuzz-msan-withavx9/fuzz/fuzz_$fuzzer out/$fuzzer -max_total_time=10 -reload=0 $artifactsprefix
8080
echo now have $(ls out/$fuzzer |wc -l) files in corpus
8181
done
8282
- name: Minimize the corpus with the fast fuzzer
8383
run: |
8484
for fuzzer in $allfuzzers; do
8585
mkdir -p out/cmin/$fuzzer
86-
build-ossfuzz-fast8/fuzz/fuzz_$fuzzer -merge=1 out/cmin/$fuzzer out/$fuzzer
86+
build-ossfuzz-fast9/fuzz/fuzz_$fuzzer -merge=1 out/cmin/$fuzzer out/$fuzzer
8787
rm -rf out/$fuzzer
8888
mv out/cmin/$fuzzer out/$fuzzer
8989
done

fuzz/build_fuzzer_variants.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ fi
7777

7878

7979
# a fuzzer with sanitizers, built with avx disabled.
80-
variant=ossfuzz-noavx8
81-
if which clang++-8 >/dev/null 2>&1 ; then
80+
variant=ossfuzz-noavx9
81+
if which clang++-9 >/dev/null 2>&1 ; then
8282
if [ ! -d build-$variant ] ; then
8383

84-
export CC=clang-8
85-
export CXX="clang++-8"
84+
export CC=clang-9
85+
export CXX="clang++-9"
8686
export CFLAGS="-fsanitize=fuzzer-no-link,address,undefined -fno-sanitize-recover=undefined -mno-avx2 -mno-avx "
8787
export CXXFLAGS="-fsanitize=fuzzer-no-link,address,undefined -fno-sanitize-recover=undefined -mno-avx2 -mno-avx"
8888
export LIB_FUZZING_ENGINE="-fsanitize=fuzzer"
@@ -103,7 +103,7 @@ if which clang++-8 >/dev/null 2>&1 ; then
103103
cd ..
104104
fi
105105
else
106-
echo "$me: WARNING clang++-8 not found, please install it to build $variant"
106+
echo "$me: WARNING clang++-9 not found, please install it to build $variant"
107107
fi
108108

109109
# a fuzzer with sanitizers, default built
@@ -132,11 +132,11 @@ if [ ! -d build-$variant ] ; then
132132
fi
133133

134134
# a fast fuzzer, for fast exploration
135-
variant=ossfuzz-fast8
136-
if which clang++-8 >/dev/null 2>&1 ; then
135+
variant=ossfuzz-fast9
136+
if which clang++-9 >/dev/null 2>&1 ; then
137137
if [ ! -d build-$variant ] ; then
138-
export CC=clang-8
139-
export CXX="clang++-8"
138+
export CC=clang-9
139+
export CXX="clang++-9"
140140
export CFLAGS="-fsanitize=fuzzer-no-link -O3 -g"
141141
export CXXFLAGS="-fsanitize=fuzzer-no-link -O3 -g"
142142
export LIB_FUZZING_ENGINE="-fsanitize=fuzzer"
@@ -157,6 +157,6 @@ if which clang++-8 >/dev/null 2>&1 ; then
157157
cd ..
158158
fi
159159
else
160-
echo "$me: WARNING clang++-8 not found, please install it to build $variant"
160+
echo "$me: WARNING clang++-9 not found, please install it to build $variant"
161161
fi
162162

0 commit comments

Comments
 (0)