alexcrichton opened PR #11461 from alexcrichton:gc-async to bytecodealliance:main:
This commit is similar to https://github.com/bytecodealliance/wasmtime/pull/11442 and https://github.com/bytecodealliance/wasmtime/pull/11460 except it's applied to the
garbage collection phase of Wasmtime's GC. Specifically the functions
that actually perform a GC are no longer duplicated across sync, async,
and maybe async versions. There's only one "always async" version and
the root-level crate entrypoints for sync versions assert that async
support is disabled and then use the async version.Worth noting here is that GC suffers from a preexisting issue described
in https://github.com/bytecodealliance/wasmtime/issues/11409 where it's not sound how aStoreOpaqueis widened to acquire
a resource limiter. This commit seemingly makes the issue worse by
adding a few moreunsafeblocks, but they're all fundamentally doing
the same thing as before. Fully solving this issue will require making
memory/table creation anasyncfunction that takes the limiter as an
argument. Doing this will require further refactoring/code movement so
my goal is to effectively maintain the status quo, but in a slightly
different location, and enable knocking out theunsafein the future.
In the meantime the previousunsafeblock is "lifted higher up" so
it's not quite so deep and should be easier to remove in the future.
alexcrichton requested fitzgen for a review on PR #11461.
alexcrichton requested wasmtime-core-reviewers for a review on PR #11461.
alexcrichton commented on PR #11461:
Note that this is currently built on https://github.com/bytecodealliance/wasmtime/pull/11460 which is in turn built on https://github.com/bytecodealliance/wasmtime/pull/11459
fitzgen submitted PR review:
Nice
fitzgen created PR review comment:
s/safe/sound/?
alexcrichton updated PR #11461.
alexcrichton has enabled auto merge for PR #11461.
alexcrichton updated PR #11461.
alexcrichton merged PR #11461.
Last updated: Dec 06 2025 at 07:03 UTC