ci(fuzz): force RUSTFLAGS=-C target-feature=-crt-static (#168 defense)#189
Merged
Conversation
The musl-target-not-installed mitigation already in fuzz.yml's "Install nightly Rust" comment prevents one failure mode (explicit musl target in the dtolnay/rust-toolchain action). But the underlying #168 hazard still surfaces when a drifted smithy runner has crt-static configured via /etc/cargo/config.toml or an inherited RUSTFLAGS env var — even on a gnu-host build, cargo-fuzz's `-Z sanitizer=address` then crashes with "sanitizer is incompatible with statically linked libc." This just recurred on PR #188 (fuzz_resolver_terminates + fuzz_fusion_roundtrip), so the meld-side mitigation needs to be stronger than "trust runner config." Setting RUSTFLAGS at the workflow env level completely overrides any cargo-config rustflags (cargo gives env-RUSTFLAGS strict precedence). On clean runners the target feature was already off, so the flag is a harmless no-op; on drifted runners it force-disables static-crt up-front before cargo-fuzz ever calls into rustc. This doesn't replace the upstream smithy ask in #168 (re-image the rust-cpu runner pool) — that's still the durable fix. But it stops the noise on every fuzz PR landing on a drifted runner until smithy gets to it. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
LS-N verification gate✅ 33/33 approved LS entries verified
Approved Failed LS entries(none) Missing regression tests(none) Updated automatically by |
This was referenced May 25, 2026
Merged
avrabe
added a commit
that referenced
this pull request
May 25, 2026
Four-PR cycle. Cycle detection for cross-component streams (#188), signed/attested release pipeline (#186, first real cut), README consumer verification recipe (#187), and a defensive fuzz workflow fix for drifted self-hosted runners (#189). v0.12.0 is the first meld release published with the new artifact flow: per-target tar.gz archives, CycloneDX SBOM, cosign-signed SHA256SUMS.txt + bundle, and SLSA v1 build provenance per archive. v0.11.0's binaries were the last bare-asset release. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
4 tasks
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.
Summary
Belt-and-suspenders defense against the #168 sanitizer/crt-static failure pattern that just recurred on PR #188 (fuzz_resolver_terminates job 77662221327 and fuzz_fusion_roundtrip job 77662221339).
`fuzz.yml` already has a thoughtful "don't install musl as a target" mitigation, but that only addresses one failure mode. The underlying hazard surfaces whenever a drifted smithy runner has `target-feature=+crt-static` configured via `/etc/cargo/config.toml` or an inherited `RUSTFLAGS` env var — even on a gnu-host build, cargo-fuzz's `-Z sanitizer=address` then crashes with the canonical "sanitizer is incompatible with statically linked libc" error.
Setting `RUSTFLAGS` at the workflow env level overrides any cargo-config rustflags (cargo gives env-`RUSTFLAGS` strict precedence). On clean runners the feature was already off, so this is a harmless no-op; on drifted runners it force-disables static-crt up-front before cargo-fuzz ever calls into rustc.
What this is not
Not a replacement for the upstream smithy ask in #168 — re-imaging the rust-cpu runner pool remains the durable fix. This stops the noise on every fuzz PR landing on a drifted runner until smithy gets to it.
Test plan
🤖 Generated with Claude Code