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
pgen
Python.asdl -rw-r--r-- 5.3 KB
acceler.c -rw-r--r-- 3.3 KB
asdl.py -rw-r--r-- 12.6 KB
asdl_c.py -rw-r--r-- 43.5 KB
grammar1.c -rw-r--r-- 1.0 KB
listnode.c -rw-r--r-- 1.2 KB
myreadline.c -rw-r--r-- 10.6 KB
node.c -rw-r--r-- 5.1 KB
parser.c -rw-r--r-- 12.4 KB
parser.h -rw-r--r-- 1.4 KB
parsetok.c -rw-r--r-- 14.2 KB
token.c -rw-r--r-- 4.5 KB
tokenizer.c -rw-r--r-- 54.7 KB
tokenizer.h -rw-r--r-- 3.7 KB

back to top