_PyExecutorObject is exposed to the abidiff tool due to indirect use in PyCodeObject
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 35.9k
- PR 合并指标
- PR 指标待抓取
描述
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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先检查 PyCodeObject 如何间接向 abidiff 暴露 _PyExecutorArray 和 _PyExecutorObject。比较两种提议的方法——opaque public struct 或 void pointer——并检查链接的 PR gh-153614 以了解当前的工作。完成的标准是:在不破坏之前的 ABI dumps 的情况下,executor 的字段和偏移量不再出现在 stable-ABI 比较中。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- tooling
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100