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
c-api
data
distributing
distutils
extending
faq
howto
includes
install
installing
library
reference
tools
tutorial
using
whatsnew
Makefile -rw-r--r-- 7.7 KB
README.rst -rw-r--r-- 4.6 KB
about.rst -rw-r--r-- 1.5 KB
bugs.rst -rw-r--r-- 4.7 KB
conf.py -rw-r--r-- 6.7 KB
contents.rst -rw-r--r-- 538 bytes
copyright.rst -rw-r--r-- 451 bytes
glossary.rst -rw-r--r-- 52.1 KB
license.rst -rw-r--r-- 45.2 KB
make.bat -rw-r--r-- 5.5 KB

README.rst

back to top