Skip to content
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

ICE on double-unwind #2584

Open
2 tasks
RalfJung opened this issue Oct 6, 2022 · 0 comments
Open
2 tasks

ICE on double-unwind #2584

RalfJung opened this issue Oct 6, 2022 · 0 comments
Labels
A-panics Area: affects panics and unwinding C-bug Category: This is a bug. I-ICE Impact: makes Miri crash with some ICE

Comments

@RalfJung
Copy link
Member

RalfJung commented Oct 6, 2022

This example demonstrates that it currently is possible to cause double-unwinding. This code actually ought to terminate in a well-defined way (as intended by WG-FFI), but variants of this example will still be possible -- by directly calling __rust_start_panic, we can circumvent the panic counter.

So there are probably two things to do here:

  • Make double unwind proper UB, rather than causing an ICE
  • Incorporate Guard against unwinding in cleanup code rust#92911 into Miri to make the example safely abort (there are some thoughts of doing these double unwind guards on the MIR level rather than the codegen level, in which case Miri wouldn't have to do anything special)
@RalfJung RalfJung added C-bug Category: This is a bug. A-panics Area: affects panics and unwinding I-ICE Impact: makes Miri crash with some ICE labels Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-panics Area: affects panics and unwinding C-bug Category: This is a bug. I-ICE Impact: makes Miri crash with some ICE
Projects
None yet
Development

No branches or pull requests

1 participant