Skip to content

_PyExecutorObject is exposed to the abidiff tool due to indirect use in PyCodeObject #149196

@Fidget-Spinner

Description

@Fidget-Spinner

Bug report

Bug description:

The problem is that PyCodeObject is thought of as part of the stable ABI in abidiff. _PyExecutorArray and thus _PyExecutorObject is not an opaque struct, so its fields and offsets are exposed as part of the stable ABI seen by the tool. Theoretically, this should be fine and not lead to crashes long as no one accesses the _PyExecutorObject, but still this is pretty annoying to have if we are to backport changes to the JIT that require changing the executor, as this will trigger a warning on abidiff tools.

There are two possible fixes, turn the executor object in the public header to be an opaque struct, or use a void pointer. I think both are fine, I'm inclined to link to the first one for type-safety reasons).

We can only fix this on main, as any prior version would break the ABIdiff/dump tools.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions