Refactor `codegen_deferred_annotations_body` to ensure `mangled` is decref'd
オープン
まだ誰も着手していません。
interpreter-core
type-bug
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
Bug report
Bug description:
Follow-up item from this PR: https://github.com/python/cpython/pull/146443#pullrequestreview-4033013919
During error cases we may fail to decref mangled while using these ADDOP* and VISIT macros. As a result, we can extract the for loop's body into a subfunction that we check the return of and decref mangled if needed.
// NOTE: ref of mangled can be leaked on ADDOP* and VISIT macros due to early returns
// fixing would require an overhaul of these macros
CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows
Linked PRs
- gh-148060
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず codegen_deferred_annotations_body を見つけ、ADDOP* マクロと VISIT マクロを使用している for ループを調査し、その後、背景を把握するためにリンクされている PR 146443 と PR 148060 を確認します。ループのエラーパスで壊れたまま解放されていないオブジェクトが残らず、既存のコード生成動作が維持されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- c
- 領域
- compilers
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100