Assertion failures from `_interpchannels._register_end_types`
未關閉
還沒有人認領這個 Issue。
3.13
3.14
extension-modules
topic-subinterpreters
type-crash
- 主要語言
- Python
- 星號
- 77.2k
- 分支
- 36k
- PR 合併指標
- PR 指標待擷取
描述
Crash report
What happened?
It's possible to abort a debug build by calling _interpchannels._register_end_types with invalid values:
import _interpchannels
_interpchannels._register_end_types(int, int)
Abort on 3.13:
python: Python/crossinterp_data_lookup.h:260: _PyCrossInterpreterData_RegisterClass: Assertion `matched->getdata == getdata' failed.
Aborted
Abort on main:
python: Python/crossinterp_data_lookup.h:271: _PyXIData_RegisterClass: Assertion `matched->getdata == getdata' failed.
Aborted
Found using fusil by @vstinner.
CPython versions tested on:
3.13, 3.14, CPython main branch
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
Python 3.13.0+ (heads/3.13:746a0c5, Nov 20 2024, 21:39:05) [GCC 13.2.0]
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先使用報告中所示的 _interpchannels._register_end_types 呼叫重現 debug-build abort,然後檢查該進入點以及 Python/crossinterp_data_lookup.h 中相關的 assertion。當無效值不再導致直譯器 abort,且該行為由回歸測試涵蓋時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- backend
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100