Staging
v0.5.0
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
.azure-pipelines
.github
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Programs
Python
Tools
m4
.gitattributes -rw-r--r-- 1.8 KB
.gitignore -rw-r--r-- 1.6 KB
.travis.yml -rw-r--r-- 8.5 KB
CODE_OF_CONDUCT.md -rw-r--r-- 630 bytes
LICENSE -rw-r--r-- 12.5 KB
Makefile.pre.in -rw-r--r-- 65.4 KB
README.rst -rw-r--r-- 9.8 KB
aclocal.m4 -rw-r--r-- 13.1 KB
config.guess -rwxr-xr-x 43.1 KB
config.sub -rwxr-xr-x 35.4 KB
configure -rwxr-xr-x 491.9 KB
configure.ac -rw-r--r-- 162.3 KB
install-sh -rwxr-xr-x 15.0 KB
pyconfig.h.in -rw-r--r-- 44.1 KB
setup.py -rw-r--r-- 101.0 KB

README.rst

back to top