platform.libc_ver() raises TypeError on a threaded libc without a version
オープン
まだ誰も着手していません。
stdlib
type-bug
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
Bug report
platform.libc_ver() raises TypeError when it scans a binary that references
a threaded C library (such as libc_r) with no version number:
>>> platform.libc_ver(executable=some_binary_referencing_libc_r_so)
Traceback (most recent call last):
...
TypeError: 'NoneType' object is not subscriptable
In the so branch of the scanning loop, when a match has a thread suffix
(_r/_pthread) but no version, ver is still None and gets subscripted.
This is a regression from gh-90548 (PR #131313), so 3.14 and later are affected.
CPython versions tested on:
3.16 (main)
Operating systems tested on:
Linux, macOS
Linked PRs
- gh-155455
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、スキャンループ内の platform.libc_ver() とその so 分岐から始め、変更を加える前にリンクされている PR gh-155455 を確認してください。バージョンのないスレッド対応 C ライブラリを参照するバイナリでケースを再現し、呼び出しで報告された TypeError が発生しなくなった時点で問題が解決したとみなしてください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- operating-systems
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 30/100