Commit a719c8f4 authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

bpo-35389: platform.platform() calls libc_ver() without executable (GH-14418)

When libc_ver() is called with an executable, the
os.confstr('CS_GNU_LIBC_VERSION') fast-path cannot be taken. Modify
platform.platform() to call libc_ver() without executable, instead of
calling libc_ver(sys.executable), since sys.executable is already the
default value.
parent 4c26abd1
...@@ -1202,7 +1202,7 @@ def platform(aliased=0, terse=0): ...@@ -1202,7 +1202,7 @@ def platform(aliased=0, terse=0):
elif system in ('Linux',): elif system in ('Linux',):
# check for libc vs. glibc # check for libc vs. glibc
libcname, libcversion = libc_ver(sys.executable) libcname, libcversion = libc_ver()
platform = _platform(system, release, machine, processor, platform = _platform(system, release, machine, processor,
'with', 'with',
libcname+libcversion) libcname+libcversion)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment