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
fixes
pgen2
tests
Grammar.txt -rw-r--r-- 6.4 KB
PatternGrammar.txt -rw-r--r-- 793 bytes
__init__.py -rw-r--r-- 7 bytes
__main__.py -rw-r--r-- 67 bytes
btm_matcher.py -rw-r--r-- 6.5 KB
btm_utils.py -rw-r--r-- 9.7 KB
fixer_base.py -rw-r--r-- 6.5 KB
fixer_util.py -rw-r--r-- 14.9 KB
main.py -rw-r--r-- 11.4 KB
patcomp.py -rw-r--r-- 6.9 KB
pygram.py -rw-r--r-- 1.3 KB
pytree.py -rw-r--r-- 27.3 KB
refactor.py -rw-r--r-- 26.8 KB

back to top