Potential integer overflow in instrumentation.c
未關閉
還沒有人認領這個 Issue。
interpreter-core
type-bug
- 主要語言
- Python
- 星號
- 77.2k
- 分支
- 36k
- PR 合併指標
- PR 指標待擷取
描述
The arithmetic expression to * (int)sizeof(_Py_CODEUNIT) can overflow if the number of instructions in a function exceeds MAX_INT / 2, as to represents the instruction offset and sizeof(_Py_CODEUNIT) is 2.
https://github.com/python/cpython/blob/4b44b3409ac026e7f13054a3daa18ab7ee14d85c/Python/instrumentation.c#L1239
Linked PRs
- gh-135179
- gh-135202
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 Python/instrumentation.c 約第 1239 行開始,檢查 issue 中標示的算術運算式。先檢視相關的 PR gh-135179 和 gh-135202;潛在溢位獲得處理且相關的 CPython 檢查通過後,即視為完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- c, python
- 領域
- backend
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 描述清楚
- 新手友好度
- 35/100