Skip to content

Commit 4385dbb

Browse files
committed
ci(fuzz): pin gnu host target to fix musl+ASAN build failure
cargo-fuzz was defaulting to x86_64-unknown-linux-musl, whose std is not installed (E0463 can't find crate for core) and whose statically-linked (crt-static) libc is incompatible with -Zsanitizer=address. Pin the build to the gnu host target via setup-rust-toolchain and an explicit --target on the fuzz run so the sanitizer-instrumented build works.
1 parent 9cac85f commit 4385dbb

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/fuzz.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ jobs:
4545
- uses: actions-rust-lang/setup-rust-toolchain@v1
4646
with:
4747
toolchain: nightly
48+
# Pin the gnu host target. cargo-fuzz otherwise defaults to the
49+
# statically-linked `x86_64-unknown-linux-musl` triple, whose std is
50+
# not installed (E0463 "can't find crate for core") AND whose
51+
# crt-static libc is incompatible with `-Zsanitizer=address`.
52+
target: x86_64-unknown-linux-gnu
4853

4954
- uses: taiki-e/install-action@v2.81.6
5055
with:
@@ -62,6 +67,7 @@ jobs:
6267
run: |
6368
cd fuzz
6469
cargo +nightly fuzz run ${{ matrix.target }} \
70+
--target x86_64-unknown-linux-gnu \
6571
-- -max_total_time=300 -max_len=4096
6672
6773
- name: Upload crash artifacts

0 commit comments

Comments
 (0)