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
Reactions are currently unavailable
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:
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