• Victor Stinner's avatar
    bpo-37926: Fix PySys_SetArgvEx(0, NULL, 0) crash (GH-15415) · c4868250
    Victor Stinner authored
    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.
    c4868250
2019-08-23-11-35-55.bpo-37926.hnI5IQ.rst 48 Bytes