forked from bytecodealliance/wasmtime
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disallow re-entering wasm while off main stack (#117)
This PR addresses an issue discussed in #109: Correctly handling the case where we re-enter wasm while already on a continuation stack is difficult. For the time being, we therefore disallow this. This PR adds the necessary logic to detect this. Concretely, in `invoke_wasm_and_catch_traps`, we inspect the chain of nested wasm (+ host) invocations, represented by the linked list of `CallThreadState` objects maintained in `wasmtime_runtime:traphandlers`. To this end, for those `CallThreadState` objects that represent execution of wasm, we store a pointer to the corresponding `Store`'s `StackChainCell`. Please note that the diff of the test file `typed_continuations.rs` looks unnecessarily scary: I moved the existing tests into a module `wasi`, and added modules `test_utils` and `host`. --------- Co-authored-by: Daniel Hillerström <[email protected]>
- Loading branch information
1 parent
846522e
commit ae380fd
Showing
7 changed files
with
643 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.