_PyExecutorObject is exposed to the abidiff tool due to indirect use in PyCodeObject
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
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
Linked PRs
- gh-153614
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining how PyCodeObject indirectly exposes _PyExecutorArray and _PyExecutorObject to abidiff. Compare the two proposed approaches—an opaque public struct or a void pointer—and inspect linked PR gh-153614 for the current work. Done means the executor's fields and offsets are no longer exposed in stable-ABI comparisons without breaking prior ABI dumps.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100