Skip to content

ICE on double-unwind #2584

Open
Open

Description

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-panicsArea: affects panics and unwindingArea: affects panics and unwindingC-bugCategory: This is a bug.Category: This is a bug.I-ICEImpact: makes Miri crash with some ICEImpact: makes Miri crash with some ICE

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions