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
2.0.rst -rw-r--r-- 58.1 KB
2.1.rst -rw-r--r-- 36.1 KB
2.2.rst -rw-r--r-- 58.9 KB
2.3.rst -rw-r--r-- 87.6 KB
2.4.rst -rw-r--r-- 62.5 KB
2.5.rst -rw-r--r-- 97.8 KB
2.6.rst -rw-r--r-- 129.0 KB
2.7.rst -rw-r--r-- 120.0 KB
3.0.rst -rw-r--r-- 38.5 KB
3.1.rst -rw-r--r-- 21.4 KB
3.2.rst -rw-r--r-- 107.1 KB
3.3.rst -rw-r--r-- 96.9 KB
3.4.rst -rw-r--r-- 107.9 KB
3.5.rst -rw-r--r-- 91.4 KB
3.6.rst -rw-r--r-- 87.6 KB
3.7.rst -rw-r--r-- 96.9 KB
3.8.rst -rw-r--r-- 71.2 KB
changelog.rst -rw-r--r-- 75 bytes
index.rst -rw-r--r-- 789 bytes

back to top