Content-Length: 325674 | pFad | https://github.com/python/cpython/issues/127604

ad Add a way of printing a C backtrace to `faulthandler` · Issue #127604 · python/cpython · GitHub
Skip to content

Add a way of printing a C backtrace to faulthandler #127604

Description

@jakkdl

Feature or enhancement

Proposal:

The faulthandler module allows registering a SIGSEGV handler to print a Python stacktrace if the program encounters a segfault. However, if developing C/C++ extension modules that may not be particularly useful on its own, and you also want the the C stacktrace.
The suggested API would be a kwarg to faulthandler.enable().

Implementation could use https://github.com/timmaxw/cfaulthandler as a starting point, timmaxw/cfaulthandler@561dbdd in particular.

The availability/usability of the feature would likely depend on platform and/or compile flags.

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/print-c-stacktrace-with-faulthandler/56834
where @gpshead approved of opening a feature request

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension-modulesC modules in the Modules dirtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: https://github.com/python/cpython/issues/127604

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy