Stream: git-wasmtime

Topic: wasmtime / PR #11415 Make Wasmtime's `FuncKey` one-to-one...


view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2025 at 22:53):

fitzgen opened PR #11415 from fitzgen:inlining-fuzz-bugs to bytecodealliance:main:

FuncKey, which used to be called CompileKey, is now one-to-one with cranelift_codegen::ir::UserExternalName, and is used for not just identifying compilation objects but also relocations and call-graph edges. This allows us to determine the StaticModuleIndex and DefinedFuncIndex pair for any cranelift_codegen::ir::FuncRef, regardless of inlining depth, which fixes some fuzz bugs on OSS-Fuzz.

This continues pushing on the idea that Wasmtime's compilation orchestration and linking should be relatively agnostic to the kinds of things it is actually compiling and linking, allowing us to tweak, add, and remove new kinds of FuncKeys more easily. Adding a new FuncKey should not require modifying relocation resolution, for example, just a little bit of code to run the associated compilation and optionally some code to extract metadata into our final artifacts for querying at runtime. Everything in between should Just Continue Working. We still aren't all the way there yet, but this does bring us a little bit closer.

Finally, in Cranelift's inlining pass, this adds a check that a block is inserted in the layout before attempting to remove it from the layout, which would otherwise cause panics. This was triggered by multi-level inlining and now-unreachable blocks in the inner callees.

I'll note that this does update basically all of the disas tests, or at least nearly all of them that make function calls. This is because the namespace/index numbering pair changed slightly to align with FuncKey, but that should pretty much be the only changes.

<!--
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 (Aug 11 2025 at 22:53):

fitzgen requested abrown for a review on PR #11415.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2025 at 22:53):

fitzgen requested wasmtime-compiler-reviewers for a review on PR #11415.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2025 at 22:53):

fitzgen requested alexcrichton for a review on PR #11415.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2025 at 22:53):

fitzgen requested wasmtime-core-reviewers for a review on PR #11415.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2025 at 22:58):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2025 at 22:58):

fitzgen created PR review comment:

Whoops, I need to fill out this comment

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2025 at 23:06):

fitzgen updated PR #11415.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 12 2025 at 02:22):

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

Subscribe to Label Action

cc @saulecabrera

<details>
This issue or pull request has been labeled: "cranelift", "wasmtime:api", "winch"

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 (Aug 12 2025 at 03:20):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 12 2025 at 09:00):

bjorn3 submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 12 2025 at 09:01):

bjorn3 created PR review comment:

Maybe print the indexes as hex without 0x prefix? format!("u{namespace:x}:{index:x}")

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

fitzgen submitted PR review.

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

fitzgen created PR review comment:

This would require also updating the CLIF parser, and I'd rather not get into that in this PR, as it is fairly unrelated.

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

fitzgen updated PR #11415.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 12 2025 at 16:42):

fitzgen updated PR #11415.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 12 2025 at 16:47):

fitzgen updated PR #11415.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 12 2025 at 18:22):

fitzgen updated PR #11415.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 12 2025 at 18:22):

fitzgen requested wasmtime-default-reviewers for a review on PR #11415.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 12 2025 at 18:57):

fitzgen merged PR #11415.


Last updated: Dec 06 2025 at 06:05 UTC