Skip to content

Add unstable C APIs for allocation-free raw-frame stack inspection #148925

Open

Description

@danielsn

Feature or enhancement

Proposal:

#145559 proposes a signal-safe mechanism to print backtraces. This is useful for human debugging, but not ideal for tools because it requires parsing human-readable text. For example, a crash-tracker may wish to export and analyze structured backtraces. Similarly, a profiler can benefit from the ability to generate structure stack-traces in pure C, without needing to reason about the safety of reentering the python interpreter.

Has this already been discussed elsewhere?

I have already discussed this feature proposal on Discourse

Links to previous discussion of this feature:

https://discuss.python.org/t/pure-c-structured-traceback/106872/8

Linked PRs

Activity

  1. added
    type-feature
    on Apr 23, 2026
  2. added 5 commits that reference this issue on Apr 23, 2026
  3. added
    interpreter-core
    on Apr 23, 2026
  4. self-assigned this
    on Apr 29, 2026
  5. added 3 commits that reference this issue on May 4, 2026
  6. changed the title [-]Expose signal-safe way to get a structured stacktrace[/-] [+]Add unstable C APIs for allocation-free raw-frame stack inspection[/+] on Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

interpreter-coretopic-C-APItype-feature

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions