python / python/cpython

JIT does not emit trampolines for jumps to addresses encoded as operands

未關閉
#149,316 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

interpreter-core topic-JIT type-bug
主要語言
Python
星號
77.2k
分支
36k
PR 合併指標
PR 指標待擷取

描述

Bug report

Bug description:

We need to declare variables volatile here and in https://github.com/python/cpython/pull/148745 otherwise the code generator emits normal jumps without the necessary patching to add trampolines.

For more details see https://github.com/python/cpython/pull/148745#discussion_r3177522254

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 Python/bytecodes.c 約第 5053 行開始,閱讀 pull request 148745 中的討論。追蹤 JIT 程式碼產生器如何處理地址作為運算元的跳躍,然後確認受影響的變數保留 trampoline 修補行為。完成標準是,此類跳躍會在 CPython main 分支上產生所需的 trampoline。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
c, python
領域
compilers
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
52/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。