alexcrichton opened PR #2407 from no-frame-info-global to main:
This commit removes the global variable associated with wasm traps which
stores frame information. The only purpose of this global is to help
symbolicateTraps created since we support creating aTrapwithout a
Store. The global, however, is only used for wasm frames on the stack,
and when wasm frames are on the stack we know that our thread local for
"what was the last context" is set and configured.The change here is to hijack this thread-local some more to effectively
store theStoreinside of it. All frame information is then moved
directly intoStoreand no longer lives off on the side in a global.
Additionally support for registering/unregistering modules is now
simplified because once a module is registered with a store it can never
be unregistered.This has one slight functional change where if there are two instances
ofStoreinterleaving calls to wasm code on the stack we'll only be
able to symbolicate one of them instead of both. That's arguably also a
feature however because this is sort of a way to leak information across
stores right now.Otherwise, though, this isn't intended to change any existing logic, but
instead keep everything working as-is.
alexcrichton updated PR #2407 from no-frame-info-global to main:
This commit removes the global variable associated with wasm traps which
stores frame information. The only purpose of this global is to help
symbolicateTraps created since we support creating aTrapwithout a
Store. The global, however, is only used for wasm frames on the stack,
and when wasm frames are on the stack we know that our thread local for
"what was the last context" is set and configured.The change here is to hijack this thread-local some more to effectively
store theStoreinside of it. All frame information is then moved
directly intoStoreand no longer lives off on the side in a global.
Additionally support for registering/unregistering modules is now
simplified because once a module is registered with a store it can never
be unregistered.This has one slight functional change where if there are two instances
ofStoreinterleaving calls to wasm code on the stack we'll only be
able to symbolicate one of them instead of both. That's arguably also a
feature however because this is sort of a way to leak information across
stores right now.Otherwise, though, this isn't intended to change any existing logic, but
instead keep everything working as-is.
alexcrichton updated PR #2407 from no-frame-info-global to main:
This commit removes the global variable associated with wasm traps which
stores frame information. The only purpose of this global is to help
symbolicateTraps created since we support creating aTrapwithout a
Store. The global, however, is only used for wasm frames on the stack,
and when wasm frames are on the stack we know that our thread local for
"what was the last context" is set and configured.The change here is to hijack this thread-local some more to effectively
store theStoreinside of it. All frame information is then moved
directly intoStoreand no longer lives off on the side in a global.
Additionally support for registering/unregistering modules is now
simplified because once a module is registered with a store it can never
be unregistered.This has one slight functional change where if there are two instances
ofStoreinterleaving calls to wasm code on the stack we'll only be
able to symbolicate one of them instead of both. That's arguably also a
feature however because this is sort of a way to leak information across
stores right now.Otherwise, though, this isn't intended to change any existing logic, but
instead keep everything working as-is.
fitzgen merged PR #2407.
Last updated: Dec 13 2025 at 19:03 UTC