Module miri::shims::panic

source ·
Expand description

Panic runtime for Miri.

The core pieces of the runtime are:

  • An implementation of __rust_maybe_catch_panic that pushes the invoked stack frame with some extra metadata derived from the panic-catching arguments of __rust_maybe_catch_panic.
  • A hack in libpanic_unwind that calls the miri_start_unwind intrinsic instead of the target-native panic runtime. (This lives in the rustc repo.)
  • An implementation of miri_start_unwind that stores its argument (the panic payload), and then immediately returns, but on the unwind edge (not the normal return edge), thus initiating unwinding.
  • A hook executed each time a frame is popped, such that if the frame pushed by __rust_maybe_catch_panic gets popped during unwinding, we take the panic payload and store it according to the extra metadata we remembered when pushing said frame.

Structs§

  • Holds all of the relevant data for when unwinding hits a try frame.

Traits§