Potential Memory Leak
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 2
- フォーク
- 2
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
In src/constants.c, if the PyNumber_And call fails, the routine returns without disposing of allocated objects.
Enclosed is a patch that fixes this, while regularizing the handling of cleanup on errors in an easier-to-understand, more structured fashion, avoiding gotos. Even with explicitly spelling out PyErr_Occurred() calls everywhere, the code is still slightly shorter.
But I think a C extension library requires too much work for this kind of thing. A more complete binding for Fontconfig can be done in pure Python with much less code.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず src/constants.c を読み、PyNumber_And の失敗パスと添付パッチを比較します。この失敗時に割り当てられたオブジェクトが破棄されること、およびエラーのクリーンアップパスが一貫して処理されることを確認します。これらのエラーパスでルーチンにリークがなければ完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- c, python
- 領域
- backend
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 42/100