python / python/cpython

Superfluous dialect symbol in inline assembly

未關閉
#157,250 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

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

描述

Bug report

Bug description:

This inline assembly block has an extra { at the start that is likely a typo:
https://github.com/python/cpython/blob/f715d25a8f0f0d57ecd2ae0dfe56c2ee01752733/Include/internal/pycore_pystate.h#L327

In GCC style inline assembly syntax, { initiates an dialect selector block [1] and this case forms an unfinished section of that.
It being silently accepted by current GCC/Clang is likely just them being permissive.

[1] https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#Multiple-assembler-dialects-in-asm-templates

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs
  • gh-157251

貢獻指南

開啟貢獻指南

從這裡開始

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

研究方向

檢查 Include/internal/pycore_pystate.h 的第 327 行,並將內嵌組合語言語法與 GCC 的多方言文件進行比較。使用 Linux 上的 GCC 和 Clang 確認預期的修正;當組合語言中不再包含未完成的方言選擇器,且相關的 CPython 檢查通過時,工作即完成。

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

評估

技術堆疊
c
領域
compilers
Issue 類型
缺陷
難度
1/5
預估耗時
1 小時以內
活躍度
停滯
描述清晰度
描述清楚
新手友好度
25/100

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

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