Improve panics/traps from imported functions#857
Merged
alexcrichton merged 2 commits intobytecodealliance:masterfrom Jan 30, 2020
Merged
Improve panics/traps from imported functions#857alexcrichton merged 2 commits intobytecodealliance:masterfrom
alexcrichton merged 2 commits intobytecodealliance:masterfrom
Conversation
pepyakin
reviewed
Jan 24, 2020
abdd191 to
96cb9d3
Compare
eec29f9 to
c9ca72a
Compare
Member
Author
|
Ok updated! |
This commit performs a few refactorings and fixes a bug as well. The changes here are: * The `thread_local!` in the `wasmtime` crate for trap information is removed. The thread local in the `wasmtime_runtime` crate is now leveraged to transmit trap information. * Panics in user-provided functions are now caught explicitly to be carried across JIT code manually. Getting Rust panics unwinding through JIT code is pretty likely to be super tricky and difficult to do, so in the meantime we can get by with catching panics and resuming the panic once we've resumed in Rust code. * Various take/record trap apis have all been removed in favor of working directly with `Trap` objects, where the internal trap object has been expanded slightly to encompass user-provided errors as well. This borrows a bit bytecodealliance#839 and otherwise will... Closes bytecodealliance#848
c9ca72a to
bee7c30
Compare
peterhuene
approved these changes
Jan 30, 2020
Member
peterhuene
left a comment
There was a problem hiding this comment.
Looks good 👍. Just a nit and a comment.
arkpar
pushed a commit
to paritytech/wasmtime
that referenced
this pull request
Mar 4, 2020
…tecodealliance#857) To use, enable the "basic-blocks" feature on cranelift-frontend.
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.
This commit performs a few refactorings and fixes a bug as well. The
changes here are:
The
thread_local!in thewasmtimecrate for trap information isremoved. The thread local in the
wasmtime_runtimecrate is nowleveraged to transmit trap information.
Panics in user-provided functions are now caught explicitly to be
carried across JIT code manually. Getting Rust panics unwinding
through JIT code is pretty likely to be super tricky and difficult to
do, so in the meantime we can get by with catching panics and resuming
the panic once we've resumed in Rust code.
Various take/record trap apis have all been removed in favor of
working directly with
Trapobjects, where the internal trap objecthas been expanded slightly to encompass user-provided errors as well.
This borrows a bit #839 and otherwise will...
Closes #848