Smoke-test the libFuzzer harness on pull requests#4981
Conversation
The libFuzzer harness in tests/fuzz/wasm-mutator-fuzz already runs continuously on OSS-Fuzz, but nothing in-tree builds or exercises it on a pull request, so a change that breaks the harness build or reintroduces a fixed loader/validator crash is only caught out-of-band, hours to days later via an OSS-Fuzz report. Add a pull_request workflow that builds the same fast-interp and classic-interp targets OSS-Fuzz builds (matching LLVM 18.1.8 and wasm-tools 1.243.0), replays the committed tests/malformed/fuzz regression corpus, and runs a short bounded fuzz, failing on any crash. It needs no secrets and no write permissions, so it behaves identically for pull requests opened within a repository and from forks.
|
I am inclined to hold this PR for two reasons: first, I have concerns regarding the GitHub Actions budget; and second, I believe we need a broader and more clearly defined feature matrix — one that includes, at minimum, Wasm 1.0 support, as well as the Tier-A running mode, which is currently under discussion |
THe intent isn't to run the full fuzzer, but just replay the corpus that previously found bugs as a smoke test. I did have github actions budget in mind :) I agree it's not critical, since the nightly run via openfuzz etc will catch things pretty quickly. let me know if you want me to expand this one to more functional areas, or back up and start with a different slice of the semi-automated feedback loop on PRs! :D |
What
Add a
pull_request-triggered smoke test for the existing libFuzzer harness intests/fuzz/wasm-mutator-fuzz/.The full harness already runs continuously on OSS-Fuzz (
google/oss-fuzz/projects/wamr), but nothing in-tree builds or exercises it on a pull request. So a change that breaks the harness build, or reintroduces a previously fixed loader/validator crash, is only caught out-of-band — an OSS-Fuzz report hours to days after merge. This moves that class of memory-safety regression to a check before review.How
For each of
fast-interp(default) andclassic-interp, the job:smith_wasm.sh.wasm_mutator_fuzztarget (ASan + UBSan + libFuzzer, from the harness's ownsanitizer_flags.cmake).tests/malformed/fuzz/*.wasmregression corpus (deterministic), then runs a short seeded bounded fuzz. Any crash / sanitizer error fails the job.Fork / upstream safety
The job needs no secrets and no write permissions (
permissions: contents: read); it builds and runs only, so it behaves identically for pull requests opened within a repository and from forks.Notes
llvm-jit/aot-compilertargets OSS-Fuzz also builds could be added.paths:limits the job to code / build / fuzz changes. If this is later made a required check, drop the filter or pair it with an always-pass companion job to avoid the required-check-plus-path-filter deadlock..debURL, so the install survives ncurses point-release bumps. The same hard-coded-URL pattern in.github/scripts/codeql_buildscript.shis currently broken; fixed separately in Fix the currently-failing CodeQL workflow and run it on pull requests #4980.Verification
Verified end-to-end on a pull request in a fork: both matrix legs build and run green in ~3.5 min each.