Skip to content

Fix globals/tables holding their registered types#11103

Merged
fitzgen merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:fix-panics
Jun 24, 2025
Merged

Fix globals/tables holding their registered types#11103
fitzgen merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:fix-panics

Conversation

@alexcrichton
Copy link
Copy Markdown
Member

This commit fixes an issue where host-created tables and globals with concrete reference types previously did not keep their associated type registrations alive for the duration of the table or global itself. This could lead to runtime panics when reflecting on their type and additionally lead to some type confusion about the global/table itself. As described in #11102 this is not a security issue, just a bug that needs fixing.

Closes #11102

This commit fixes an issue where host-created tables and globals with
concrete reference types previously did not keep their associated type
registrations alive for the duration of the table or global itself. This
could lead to runtime panics when reflecting on their type and
additionally lead to some type confusion about the global/table itself.
As described in bytecodealliance#11102 this is not a security issue, just a bug that
needs fixing.

Closes bytecodealliance#11102
@alexcrichton alexcrichton requested a review from a team as a code owner June 23, 2025 16:13
@alexcrichton alexcrichton requested review from pchickey and removed request for a team June 23, 2025 16:13
@pchickey pchickey requested review from fitzgen and removed request for pchickey June 23, 2025 16:29
@github-actions github-actions Bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Jun 23, 2025
@fitzgen fitzgen added this pull request to the merge queue Jun 24, 2025
Merged via the queue into bytecodealliance:main with commit c81df20 Jun 24, 2025
41 checks passed
@alexcrichton alexcrichton deleted the fix-panics branch June 24, 2025 15:19
bongjunj pushed a commit to prosyslab/wasmtime that referenced this pull request Oct 20, 2025
…1103)

This commit fixes an issue where host-created tables and globals with
concrete reference types previously did not keep their associated type
registrations alive for the duration of the table or global itself. This
could lead to runtime panics when reflecting on their type and
additionally lead to some type confusion about the global/table itself.
As described in bytecodealliance#11102 this is not a security issue, just a bug that
needs fixing.

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

Labels

wasmtime:api Related to the API of the `wasmtime` crate itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Panic with host-defined tables/globals and concrete reference types

2 participants