Uh oh!
There was an error while loading. Please reload this page.
Add hooks for Miri panic unwinding - #60026
Conversation
rust-highfive
commented
Apr 17, 2019
r? @estebank (rust_highfive has picked a reviewer for you, use r? to override) |
Aaron1011
commented
Apr 17, 2019
r? @RalfJung |
Aaron1011
commented
Apr 23, 2019
@RalfJung: Are there any changes that you'd like me to make? |
RalfJung
commented
Apr 23, 2019
Sorry, I didn't yet have the chance to look at this. It's on my list though! |
Uh oh!
There was an error while loading. Please reload this page.
I am a bit surprised by the implementation strategy here. Logically speaking, what happens with unwinding is that every function has two "return continuations", as in, two "return addresses" that it might jump to when execution is done: the successful one for normal completion, and the "unwind" address for when unwinding is happening. So, what I'd expect is that I think with that approach you can also keep using the normal interpreter loop in Is there a particular reason you chose the approach you did (which I am still trying to understand)? |
RalfJung
commented
Apr 29, 2019
Also, this is super cool! I didn't expect unwind support for Miri to happen any time soon, so I am very happy to see you tackle this. :) |
Aaron1011
commented
Apr 29, 2019
@RalfJung: My main goal was to make the minimum amount of changes to |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
RalfJung
commented
May 19, 2019
TBH that sounds like overkill to me. The action that happens on a pop is so simple (just take the unwind continuation instead of the return continuation), I don't think this warrants the mental overhead of a machine hook. I mean, it's literally just |
oli-obk
commented
May 19, 2019
I have no personal preference. I was mainly aiming to explain how to achieve @Aaron1011 's target |
5a5b99e to
8aa3d5dComparerust-highfive
commented
May 29, 2019
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
1ae1ec5 to
32542b4CompareAaron1011
commented
Jun 1, 2019
@RalfJung: I've made the changes you requested |
bors
commented
Jun 2, 2019
☔ The latest upstream changes (presumably #61278) made this pull request unmergeable. Please resolve the merge conflicts. |
32542b4 to
3b7be70Comparebors
commented
Jun 4, 2019
☔ The latest upstream changes (presumably #61467) made this pull request unmergeable. Please resolve the merge conflicts. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
bors
commented
Nov 12, 2019
Add hooks for Miri panic unwinding This commits adds in some additional hooks to allow Miri to properly handle panic unwinding. None of this should have any impact on CTFE mode This supports rust-lang/miri#693
rust-highfive
commented
Nov 12, 2019
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
bors
commented
Nov 12, 2019
💔 Test failed - checks-azure |
Aaron1011
commented
Nov 12, 2019
It looks like @RalfJung Can you re-try this? |
bjorn3
commented
Nov 12, 2019
4GB memory allocation during compilation of hex is a lot. |
Aaron1011
commented
Nov 12, 2019
Note that |
RalfJung
commented
Nov 12, 2019
Well let's try one last time. @bors retry rollup=never |
bors
commented
Nov 12, 2019
Add hooks for Miri panic unwinding This commits adds in some additional hooks to allow Miri to properly handle panic unwinding. None of this should have any impact on CTFE mode This supports rust-lang/miri#693
bors
commented
Nov 13, 2019
☀️ Test successful - checks-azure |
Support unwinding after a panic Fixes#658 This commit adds support for unwinding after a panic. It requires a companion rustc PR to be merged, in order for the necessary hooks to work properly. Currently implemented: * Selecting between unwind/abort mode based on the rustc Session * Properly popping off stack frames, unwinding back the caller * Running 'unwind' blocks in Mir terminators Not yet implemented: * 'Abort' terminators This PR was getting fairly large, so I decided to open it for review without implementing 'Abort' terminator support. This could either be added on to this PR, or merged separately. I've a test to exercise several different aspects of unwind panicking. Ideally, we would run Miri against the libstd panic tests, but I haven't yet figured out how to do that. This depends on rust-lang/rust#60026
Support unwinding after a panic Fixes#658 This commit adds support for unwinding after a panic. It requires a companion rustc PR to be merged, in order for the necessary hooks to work properly. Currently implemented: * Selecting between unwind/abort mode based on the rustc Session * Properly popping off stack frames, unwinding back the caller * Running 'unwind' blocks in Mir terminators Not yet implemented: * 'Abort' terminators This PR was getting fairly large, so I decided to open it for review without implementing 'Abort' terminator support. This could either be added on to this PR, or merged separately. I've a test to exercise several different aspects of unwind panicking. Ideally, we would run Miri against the libstd panic tests, but I haven't yet figured out how to do that. This depends on rust-lang/rust#60026
Support unwinding after a panic Fixes#658 This commit adds support for unwinding after a panic. It requires a companion rustc PR to be merged, in order for the necessary hooks to work properly. Currently implemented: * Selecting between unwind/abort mode based on the rustc Session * Properly popping off stack frames, unwinding back the caller * Running 'unwind' blocks in Mir terminators Not yet implemented: * 'Abort' terminators This PR was getting fairly large, so I decided to open it for review without implementing 'Abort' terminator support. This could either be added on to this PR, or merged separately. I've a test to exercise several different aspects of unwind panicking. Ideally, we would run Miri against the libstd panic tests, but I haven't yet figured out how to do that. This depends on rust-lang/rust#60026
This commits adds in some additional hooks to allow Miri to properly
handle panic unwinding. None of this should have any impact on CTFE mode
This supports rust-lang/miri#693