cfallin opened PR #14009 from cfallin:fix-tag-exn-ty to bytecodealliance:main:
We previously kept two interned types in a
Tag: one corresponding to the function signature type, and one corresponding to the exception type. (These are distinct and need to be distinct: we need a home for the exn object layout that is not the function type.)However, when a
Tagwas created via the host API, the outer object would root the tag itself with aRegisteredType, but the corresponding exception type was left unrooted, and hence the index could be reused.This PR removes the
exceptionfield fromTagcompletely, avoiding the rooting issue. Instead, a side-table records the tag -> exception type mapping during compilation, where it is actually needed.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
cfallin requested fitzgen for a review on PR #14009.
cfallin requested wasmtime-compiler-reviewers for a review on PR #14009.
cfallin requested wasmtime-core-reviewers for a review on PR #14009.
:thumbs_up: fitzgen submitted PR review.
:speech_balloon: fitzgen created PR review comment:
I don't think this is incorrect, but is there a reason we shouldn't just register the type in the store now? That seems a bit simpler to me.
cfallin updated PR #14009.
:memo: cfallin submitted PR review.
:speech_balloon: cfallin created PR review comment:
Ah, nice, yeah, things get even simpler -- treating this as a registered type rooted by the dummy module lets us have a truly tiny diff. Updated, thanks!
cfallin has enabled auto merge for PR #14009.
cfallin added PR #14009 Exceptions: remove unrooted exception-type index in Tag. to the merge queue
:check: cfallin merged PR #14009.
cfallin removed PR #14009 Exceptions: remove unrooted exception-type index in Tag. from the merge queue
Last updated: Jul 29 2026 at 05:03 UTC