Signal handling for non-Python WASM modules#6098
Draft
logan-gatlin wants to merge 4 commits intocloudflare:mainfrom
Draft
Signal handling for non-Python WASM modules#6098logan-gatlin wants to merge 4 commits intocloudflare:mainfrom
logan-gatlin wants to merge 4 commits intocloudflare:mainfrom
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
c442aec to
4eff7fd
Compare
Author
|
I have read the CLA Document and I hereby sign the CLA |
Author
|
Looks like rebase messed up the history EDIT: fixed |
adfa176 to
6a6837b
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds a shim around
WebAssembly.InstanceandWebAssembly.instantiatewhich checks for signal handling capabilities. If present, grab a reference to the module's linear memory, and pass along signals to it. Currently the only supported signals are a CPU limit warning (sent from the host) and a termination notice (set by the module to indicate it has aborted).In order to receive signals, a module must export a global
i32address called "signal_address_v1" into linear memory, and either import or export a memory called "memory". The CPU limit warning is atsignal_address_v1[0], while the termination notice is expected to be atsignal_address_v1[1].