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
symbolicateTrap
s created since we support creating aTrap
without 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 theStore
inside of it. All frame information is then moved
directly intoStore
and 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
ofStore
interleaving 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
symbolicateTrap
s created since we support creating aTrap
without 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 theStore
inside of it. All frame information is then moved
directly intoStore
and 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
ofStore
interleaving 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
symbolicateTrap
s created since we support creating aTrap
without 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 theStore
inside of it. All frame information is then moved
directly intoStore
and 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
ofStore
interleaving 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 23 2024 at 12:05 UTC