Skip to content

ci: fuzz smoke step builds for the host triple and fails when the build fails - #1079

Merged
avrabe merged 1 commit into
mainfrom
ci/fuzz-smoke-host-target
Oct 10, 2026
Merged

avrabe merged 1 commit into
mainfrom
ci/fuzz-smoke-host-target

Conversation

@avrabe

@avrabe avrabe commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

I found this while verifying #1078 on main. The ci.yml Fuzz Testing job has never fuzzed anything.

Evidence. Job logs before #1078 (job 114071052937) and after it (114098537961) both show eight could not compile failures, one per target:

error: sanitizer is incompatible with statically linked libc, disable it using `-C target-feature=-crt-static`

After #1078 there is also can't find crate for core, because the pinned nightly has no musl std. Each cargo +nightly fuzz run … || true swallowed the failure, so the job stayed green.

Cause. taiki-e/install-action ships a musl build of cargo-fuzz, and cargo-fuzz defaults --target to the triple it was built for. The scheduled fuzz.yml is unaffected: it runs cargo install cargo-fuzz, which gives a gnu build, and that run fuzzes for real (for example artifact_ids: 11,470,701 runs in 901 s).

Fix (ci.yml only).

  • host=$(rustc -vV | sed -n 's/^host: //p'), passed as --target to cargo fuzz build and cargo fuzz run.
  • The build is a separate command under set -euo pipefail, so a build failure fails the job. A fuzz run's finding stays non-blocking, as before.
  • cargo fuzz list no longer hides its errors.

Checks.

  • On macOS, with the pinned nightly and --target aarch64-apple-darwin, every crate compiles. The link fails with ld: initializer pointer has no target, a known macOS SDK linker issue that does not occur on Linux.
  • cargo fuzz build|run --target exists in cargo-fuzz.
  • The workflow parses and yamllint reports 0 errors.

The job runs only on pushes to main (it is continue-on-error), so the evidence will be the post-merge run's log. I will check it for Fuzzing <target> followed by libFuzzer Done N runs lines.

Also seen, not addressed here. In fuzz.yml, the cli_argv and yaml_footguns jobs failed on the last run. They need a separate look: findings, or setup.

🤖 Generated with Claude Code

https://claude.ai/code/session_015HMQUV3u86jN2hmCtXNTc9

… build fails

The ci.yml Fuzz job fuzzed nothing on any run: install-action ships a musl
build of cargo-fuzz, cargo-fuzz defaults its --target to the triple it was
built for, and every target failed to compile (sanitizer incompatible with
statically linked libc; after #1078 also no musl std in the pinned nightly).
`|| true` on each run kept the step green. The job log of the run before
#1078 shows the same eight compile failures, so this predates the pin.

The step now passes the host triple to `cargo fuzz build` and `cargo fuzz
run`, runs the build as its own command under `set -euo pipefail`, and keeps
only a fuzz run's finding non-blocking. The job runs only on pushes to main,
so the evidence is that run's log.

Refs: REQ-267

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015HMQUV3u86jN2hmCtXNTc9
@codecov

codecov Bot commented Oct 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@avrabe
avrabe merged commit 9493187 into main Oct 10, 2026
33 checks passed
@avrabe
avrabe deleted the ci/fuzz-smoke-host-target branch October 10, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant