Staging
v0.5.1
https://github.com/python/cpython
Revision ca9ae94a2aba35d94ac1ec081f9bcac3a13aebd3 authored by Victor Stinner on 23 August 2019, 11:22:14 UTC, committed by GitHub on 23 August 2019, 11:22:14 UTC
empty_argv is no longer static in Python 3.8, but it is declared in
a temporary scope, whereas argv keeps a reference to it.
empty_argv memory (allocated on the stack) is reused by
make_sys_argv() code which is inlined when using gcc -O3.

Define empty_argv in PySys_SetArgvEx() body, to ensure
that it remains valid for the whole lifetime of
the PySys_SetArgvEx() call.

(cherry picked from commit c48682509dc49b43fe914fe6c502bc390345d1c2)
1 parent 994925b
History
Tip revision: ca9ae94a2aba35d94ac1ec081f9bcac3a13aebd3 authored by Victor Stinner on 23 August 2019, 11:22:14 UTC
bpo-37926: Fix PySys_SetArgvEx(0, NULL, 0) crash (GH-15415) (GH-15420)
Tip revision: ca9ae94
File Mode Size
mime
__init__.py -rw-r--r-- 1.7 KB
_encoded_words.py -rw-r--r-- 8.3 KB
_header_value_parser.py -rw-r--r-- 102.2 KB
_parseaddr.py -rw-r--r-- 17.2 KB
_policybase.py -rw-r--r-- 14.7 KB
architecture.rst -rw-r--r-- 9.3 KB
base64mime.py -rw-r--r-- 3.5 KB
charset.py -rw-r--r-- 16.7 KB
contentmanager.py -rw-r--r-- 10.4 KB
encoders.py -rw-r--r-- 1.7 KB
errors.py -rw-r--r-- 3.6 KB
feedparser.py -rw-r--r-- 22.2 KB
generator.py -rw-r--r-- 19.5 KB
header.py -rw-r--r-- 23.5 KB
headerregistry.py -rw-r--r-- 20.1 KB
iterators.py -rw-r--r-- 2.1 KB
message.py -rw-r--r-- 46.0 KB
parser.py -rw-r--r-- 4.9 KB
policy.py -rw-r--r-- 10.1 KB
quoprimime.py -rw-r--r-- 9.6 KB
utils.py -rw-r--r-- 13.2 KB

back to top