You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Configure async task context on realloc calls (#13949)
* Configure async task context on `realloc` calls
This commit is an implementation of WebAssembly/component-model#680
which is a semantic change for invocations of the `realloc` canonical
ABI option. Previously when this function was invoked the configured
context-storage was whatever happened to run last in the store and in
general wasn't well-defined. Additionally the context of the thread
being run in was whatever happened to run last. The goal of the upstream
spec change, and this commit, is to fully define what happens in this
situation. Specifically:
* Invocations of `realloc` always start with `context` slots set to 0.
* The `thread.index` intrinsics, part of the component-model-threading
proposal, is now no longer exempt from may-leave checks.
These changes combined mean that it's not actually possible for
`realloc` to witness anything about its thread identity. This means that
we don't actually have to allocate anything, all that's necessary is to
save/restore context around invocation of `cabi_realloc`.
While this is a breaking change it's not expected to be observable in
the ecosystem. This only affects `context` slots which are primarily
only used for the WASIp3 ABI as the stack pointer and TLS base. There is
no shipping WASIp3 target anywhere right now, so this breakage should
not be observable.
* Fix conditional builds
* Add a note about restoration
0 commit comments