Stream: git-wasmtime

Topic: wasmtime / PR #12047 Add async to the component_api fuzzer


view this post on Zulip Wasmtime GitHub notifications bot (Nov 19 2025 at 16:22):

alexcrichton assigned dicej to PR #12047.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 19 2025 at 16:22):

alexcrichton opened PR #12047 from alexcrichton:fuzz-async-roundtrip to bytecodealliance:main (assigned to dicej):

This commit extends the preexisting component_api fuzzer in Wasmtime to support async. This required a fair bit of refactoring to how the fuzzer worked but the basic idea remains the same. This fuzzer generates:

In essence a component model value is threaded into a component, to another composed component, then back out to the host. The return value then makes its way back through the same channel. The fuzz test ensures that the parameters received in the host import are the same as those passed to the export. Additionally the return value of the export is ensured to be the same as the one that the host import returned. In essence this is testing ABI handling in Wasmtime to ensure that composition works correctly in addition to lifting/lowering code.

This fuzzer additionally has a "static" and "dynamic" mode where, at compile time, N components are generated with different signatures and use the "typed" APIs of Wasmtime. For "dynamic" Val is used to test and arbitrary components are generated at fuzz-time. The fuzzer finally executes this roundtrip in a loop multiple times in one fuzz test case to test different runtime-shapes of values in addition to compile-time-shapes of values.

The main addition in this commit is to extend all of this with the async ABI. The following knobs were added and implemented:

This is intended to stress combining different flavors of ABI with different behaviors to ensure that all the various paths throughout Wasmtime and such are hit. The goal of this fuzzer is to stress ABI lifting/lowering, so this is not handling much related to async event scheduling (that's for a future fuzzer).

In a follow-up commit I hope to extend this fuzzer with some async event scheduling nonetheless. For example the fuzzer will generate an async yield point before/after calling task.return or before/after calling the host import. That is intended to stress first_poll-vs-not behavior as it relates to ABI handling. None of that is yet implemented and for this fuzzer async calls are assumed to always succeed immediately for now.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Nov 19 2025 at 16:22):

alexcrichton requested wasmtime-fuzz-reviewers for a review on PR #12047.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 19 2025 at 16:22):

alexcrichton requested wasmtime-default-reviewers for a review on PR #12047.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 19 2025 at 16:22):

alexcrichton requested wasmtime-core-reviewers for a review on PR #12047.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 19 2025 at 16:22):

alexcrichton requested fitzgen for a review on PR #12047.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 19 2025 at 16:22):

alexcrichton commented on PR #12047:

I ran this overnight and it found https://github.com/bytecodealliance/wasmtime/issues/12046, but that took quite some time. I expect it'll probably uncover something else but I think this is ready to at least send to oss-fuzz.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 19 2025 at 17:10):

alexcrichton updated PR #12047 (assigned to dicej).

view this post on Zulip Wasmtime GitHub notifications bot (Nov 19 2025 at 19:44):

github-actions[bot] commented on PR #12047:

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:

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

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Nov 19 2025 at 20:37):

dicej submitted PR review:

LGTM. Thanks for doing this!

view this post on Zulip Wasmtime GitHub notifications bot (Nov 19 2025 at 21:16):

alexcrichton merged PR #12047.


Last updated: Dec 06 2025 at 07:03 UTC