-
Notifications
You must be signed in to change notification settings - Fork 798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run Wasm code on a separate stack #2807
Merged
Merged
Commits on Mar 14, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 7467ec3 - Browse repository at this point
Copy the full SHA 7467ec3View commit details -
Fix stack probing in the singlepass compiler
Stack probes must be done before the stack pointer is adjusted. This ensures that the stack pointer is still within the bounds of the stack when inspected by the signal handler.
Configuration menu - View commit details
-
Copy full SHA for 054e524 - Browse repository at this point
Copy the full SHA 054e524View commit details -
Run Wasm code on a separate stack
This uses the [corosensei](https://crates.io/crates/corosensei) crate to run Wasm code on a separate stack from the main thread stack. In trap handlers for stack overflows and memory out of bounds accesses, we can now check whether we are executing on the Wasm stack and reset execution back to the main thread stack when returning from the trap handler. When Wasm code needs to perform an operation which may modify internal data structures (e.g. growing a memory) then execution must switch back to the main thread stack using on_host_stack. This is necessary to avoid leaving internal data structure in an inconsistent state when a stack overflow happens. In the future, this can also be used to suspend execution of a Wasm module (#1127) by modeling it as an async function call. Fixes #2757 Fixes #2562
Configuration menu - View commit details
-
Copy full SHA for ca6f83c - Browse repository at this point
Copy the full SHA ca6f83cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 83fd790 - Browse repository at this point
Copy the full SHA 83fd790View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b86fe8 - Browse repository at this point
Copy the full SHA 2b86fe8View commit details -
Configuration menu - View commit details
-
Copy full SHA for f9d1cfd - Browse repository at this point
Copy the full SHA f9d1cfdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 58bab0f - Browse repository at this point
Copy the full SHA 58bab0fView commit details -
Configuration menu - View commit details
-
Copy full SHA for af3d948 - Browse repository at this point
Copy the full SHA af3d948View commit details -
Remove the custom probestack trampoline in compiler-cranelift
This is now handled by the generic trampoline code in the engine.
Configuration menu - View commit details
-
Copy full SHA for 657bbae - Browse repository at this point
Copy the full SHA 657bbaeView commit details -
Configuration menu - View commit details
-
Copy full SHA for a280914 - Browse repository at this point
Copy the full SHA a280914View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3d52bf2 - Browse repository at this point
Copy the full SHA 3d52bf2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 742c20a - Browse repository at this point
Copy the full SHA 742c20aView commit details -
Configuration menu - View commit details
-
Copy full SHA for c4e1c5f - Browse repository at this point
Copy the full SHA c4e1c5fView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.