Stream: git-wasmtime

Topic: wasmtime / PR #2407 Remove the global variable associated...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 12 2020 at 21:52):

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
symbolicate Traps created since we support creating a Trap 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 the Store inside of it. All frame information is then moved
directly into Store 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
of Store 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.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 12 2020 at 22:11):

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
symbolicate Traps created since we support creating a Trap 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 the Store inside of it. All frame information is then moved
directly into Store 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
of Store 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.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 12 2020 at 22:33):

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
symbolicate Traps created since we support creating a Trap 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 the Store inside of it. All frame information is then moved
directly into Store 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
of Store 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.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2020 at 00:35):

fitzgen merged PR #2407.


Last updated: Oct 23 2024 at 20:03 UTC