Skip to content

panics when used from x86_64 interrupt handler #55

@m-mueller678

Description

@m-mueller678

I am calling _Unwind_Backtrace from within an x86_64 interrupt handler. When unwinding tries to proceed to the caller of the interrupt frame, it panics. I think it should do one of these two instead:

  • continue unwinding into the code that was interrupted (not sure if possible)
  • terminate the backtrace at the interrupt frame (maybe with an error)

The panic happens here in Frame::unwind:

new_ctx[*reg] = value;

with reg = gimli::common::Register (17)

  unwinding::unwinder::with_context::<unwinding::abi::UnwindReasonCode, unwinding::unwinder::_Unwind_Backtrace::{closure#0}>
  _Unwind_Backtrace
  __rustc::rust_begin_unwind
  <unwinding::unwinder::arch::x86_64::Context as core::ops::index::IndexMut<gimli::common::Register>>::index_mut
  <unwinding::unwinder::frame::Frame>::unwind
  unwinding::unwinder::_Unwind_Backtrace::{closure#0}
  unwinding::unwinder::with_context::delegate::<unwinding::abi::UnwindReasonCode, unwinding::unwinder::_Unwind_Backtrace::{closure#0}>

I do not know how unwind normally detects that it has reached the end of the stack. Do I need to place some special bytes there to mark it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions