khagankhan opened PR #12513 from khagankhan:struct-locals-etc to bytecodealliance:main:
- Add support for generating locals, globals, and tables that contain structrefs and concretely typed struct references
- Add new or extend existing fuzzer ops for accessing locals/globals/tables of structrefs and concretely typed struct references
This PR implements the above changes. Open to feedback and reviews.
For now, all generated references are marked as
nullable: true. As discussed, we will need to track nullability more precisely. I can either refine this within this PR after initial review, or follow up with a small, focused PR immediately afterward.cc @fitzgen @eeide
khagankhan requested wasmtime-fuzz-reviewers for a review on PR #12513.
khagankhan requested fitzgen for a review on PR #12513.
github-actions[bot] added the label fuzzing on PR #12513.
github-actions[bot] commented on PR #12513:
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 <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
fitzgen submitted PR review:
Thanks! Looks good once the following things are addressed.
fitzgen created PR review comment:
I like that you bundled this stuff up into a struct that we can pass around as a single thing, that's a great clean up.
A couple of nitpicks/bikesheds however:
The comment is not particularly helpful to someone reading the code for the first time, e.g. which function is "the function" and is "ctx" a parameter name or something else? I think something like this would be better:
The base offsets and indices for various Wasm entities within their index spaces in the the encoded Wasm binary.
Also, three slashes (
///) for doc comments (even though this isn'tpub, its still the idiomatic style).Perhaps we can rename this to
WasmEncodingIndicesorWasmEncodingBasesor something along those lines? "Storage" feels like a bit of a misnomer to me.
fitzgen created PR review comment:
log::info!("gc_ops: take_struct(<ref null struct>)");
fitzgen created PR review comment:
Comment says
(ref any)but the actual type added is(ref null struct).At minimum, we should make the comment match the actual code. In the fullness of time (okay as a follow up PR) we should probably have both a
(ref null any)and a(ref null struct)global.
khagankhan updated PR #12513.
khagankhan commented on PR #12513:
Thanks @fitzgen! Ready for the review.
fitzgen submitted PR review:
Thanks!
fitzgen added PR #12513 Struct locals etc to the merge queue.
fitzgen merged PR #12513.
fitzgen removed PR #12513 Struct locals etc from the merge queue.
Last updated: Feb 24 2026 at 04:36 UTC