Skip to content

Some fuzzing improvements#12962

Open
tschneidereit wants to merge 3 commits intobytecodealliance:mainfrom
tschneidereit:fuzzing-improvements
Open

Some fuzzing improvements#12962
tschneidereit wants to merge 3 commits intobytecodealliance:mainfrom
tschneidereit:fuzzing-improvements

Conversation

@tschneidereit
Copy link
Copy Markdown
Member

Together, these lead to a meaningful uptick in coverage from similarly-length local runs.

In particular,

  • the dedicated component_async target gave me 60% coverage of runtime/component/concurrent, where OSS-Fuzz is at around 40%
  • the misc improvements make all of the sub-targets covered, whereas currently on OSS-Fuzz, this target is virtually unused because, IIUC, most of the time it aborts immediately.

I honestly don't know how useful the dictionary will be, but we should be able to see by observing behavior of the affected fuzzers.

We have poor coverage for this 'misc' sub-target, so let's make it more prominent.
Specifically:
- drop the component_async target, now that that is its own thing
- as a side-benefit, skip calling oracles::component_async::init()
- improve and simplify the sub-target selection logic. Before, the majority of invocations of misc didn't do anything, because the input byte would select a non-existent sub-target. This is visible in the extremely low coverage of the misc.rs file, and consequently equally low utilization of the misc target on OSS-Fuzz
This adds a fairly expansive [dictionary](https://llvm.org/docs/LibFuzzer.html#dictionaries) for use by the `compile` and `instantiate` targets. I had Claude Opus generate the dictionary and checked it reasonably, but not terribly thoroughly. My understanding is that mistakes in it should be harmless, since the fuzzer should learn quickly not to use patterns that lead nowhere.
@tschneidereit tschneidereit requested a review from a team as a code owner April 4, 2026 18:16
@tschneidereit tschneidereit requested review from fitzgen and removed request for a team April 4, 2026 18:16
@github-actions github-actions bot added the fuzzing Issues related to our fuzzing infrastructure label Apr 4, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 4, 2026

Subscribe to Label Action

cc @fitzgen

Details This issue or pull request has been labeled: "fuzzing"

Thus the following users have been cc'd because of the following labels:

  • fitzgen: fuzzing

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fuzzing Issues related to our fuzzing infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant