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

Add a C API nwind_backtrace around the local unwind API #37

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Sep 20, 2023

  1. Add a C API nwind_backtrace around the local unwind API

    This allows other projects not written in Rust to consume this
    unwinding library. The API is pretty basic and only offers the
    fundamental building blocks required for an external consumer
    to drive the unwinding. There is no fancy lazy global static
    address space, nor any thread local unwind context - configuring
    that is left to the consumer of this API.
    milianw committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    24779a3 View commit details
    Browse the repository at this point in the history
  2. Warn when the FDE pointer is before the base address

    In my case this seems to happen, leading to panics such as:
    ```
    thread '<unnamed>' panicked at 'attempt to subtract with overflow', not-perf/nwind/src/frame_descriptions.rs:463:125
    stack backtrace:
       0: rust_begin_unwind
                 at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:578:5
       1: core::panicking::panic_fmt
                 at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/panicking.rs:67:14
       2: core::panicking::panic
                 at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/panicking.rs:117:5
       3: nwind::frame_descriptions::FrameDescriptions<E>::find_unwind_info
                 at not-perf/nwind/src/frame_descriptions.rs:463:125
    ```
    milianw committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    3d87bba View commit details
    Browse the repository at this point in the history
  3. Add optional env_logger feature to the nwind-capi

    This way one can opt-in to get extended debug logs when using
    the library, i.e. `cargo build --features "env_logger"`
    milianw committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    0193313 View commit details
    Browse the repository at this point in the history