ci(fuzz): build fuzz harness for gnu target, not musl#97
Merged
Conversation
cargo-fuzz derives its default build target from its own host triple. It is binstalled as a musl binary, so the harness defaulted to x86_64-unknown-linux-musl. Static musl libc is incompatible with the required AddressSanitizer (-Zsanitizer=address), so mtl-core failed to compile and libFuzzer exited non-zero with no artifact, turning the fuzz smoke job red on every PR. Pin --target x86_64-unknown-linux-gnu (the runner's rustc host) on the cargo fuzz run invocation so the harness builds against glibc where ASan works. Gate semantics are unchanged.
madmax983
marked this pull request as ready for review
July 16, 2026 15:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before
The
fuzz smokejob was red on every PR.cargo-fuzzis installed on the runner as a musl binary, and it derives its default build target from its own host triple — so the fuzz harness was being built forx86_64-unknown-linux-musl. Static musl libc is incompatible with the AddressSanitizer instrumentation the harness requires (-Zsanitizer=address), somtl-corefailed to compile, libFuzzer exited non-zero, and no crash/timeout artifact was ever produced. The job failed for pure-infra reasons — it never actually fuzzed anything.After
The harness is built for
x86_64-unknown-linux-gnu(the runner's own rustc host), which links against glibc where ASan works. The smoke build compiles and the targets actually fuzz. Gate semantics are unchanged:crash-*still fails the job,timeout-*/oom-*remain advisory.How
Single-line change in
.github/scripts/fuzz-smoke.sh(thecargo fuzz runinvocation, ~line 46): pin--target x86_64-unknown-linux-gnuon the command line so cargo-fuzz overrides its musl-derived default target. The gnu target is the runner's rustc host default, so no extrarustup target addis needed. A comment documents the musl/ASan incompatibility.bash -non the script passes.Unrelated to PR #96 (paper branch). This is a standalone CI-infra fix.
Generated by Claude Code