Skip to content

BUG: Validate All Py_* Functions in C Extensions check for NULL #49756

Open
@WillAyd

Description

@WillAyd

@jbrockmendel pointed out in #49034 that we don't consistently validate the return of Py_* functions in the C API. The net effect of this is that our extensions are much harder to refactor, as our lack of checks allows at worst for undefined behavior and at best for segfaults.

If someone were to audit the extensions we could easily add in error handling where missing and shore up these extensions. See also https://docs.python.org/3/c-api/exceptions.html#

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions