alexcrichton opened PR #11481 from alexcrichton:remove-unsound-widening-borrows to bytecodealliance:main:
This commit removes preexisting unsoundness in Wasmtime where a
&mut StoreOpaqueborrow was "widened" into encompassing the limiter on
theTinStoreInner<T>, for example, by using the self-pointer
located in an instance or the store. This fix is done by threading
&mut StoreOpaqueas a parameter separately from a
StoreResourceLimiter. This means that various callers now take a new
Option<&mut StoreResourceLimiter<'_>>parameter in various locations.Closes https://github.com/bytecodealliance/wasmtime/issues/11409
alexcrichton requested dicej for a review on PR #11481.
alexcrichton requested wasmtime-core-reviewers for a review on PR #11481.
alexcrichton commented on PR #11481:
Currently built on https://github.com/bytecodealliance/wasmtime/pull/11480, which is in turn built on https://github.com/bytecodealliance/wasmtime/pull/11470, so the first three commits aren't part of this PR
dicej submitted PR review.
dicej created PR review comment:
Why do we not need an
assert!(store.0.async_support())here anymore?
alexcrichton submitted PR review.
alexcrichton created PR review comment:
A good question! That's part of the previous commits and Nick was also curious here, with some rationale in my response over there
fitzgen submitted PR review:
Nice!
alexcrichton updated PR #11481.
alexcrichton has enabled auto merge for PR #11481.
alexcrichton merged PR #11481.
Last updated: Dec 06 2025 at 06:05 UTC