Author vstinner
Recipients hroncok, vstinner
Date 2019-08-23.09:39:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Oops, it's my fault! PR 15415 fix the crash.

The regression was introduced by:

commit 74f6568bbd3e70806ea3219e8bacb386ad802ccf
Author: Victor Stinner <>
Date:   Fri Mar 15 15:08:05 2019 +0100

    bpo-36301: Add _PyWstrList structure (GH-12343)

Simplified change:

-        static wchar_t *empty_argv[1] = {L""};
+        wchar_t* empty_argv[1] = {L""};

It's a deliberate change to not waste memory: PySys_SetArgvEx() (make_sys_argv()) is only called once, whereas static keeps the memory for the whole lifecycle of the process.

But I didn't notice a subtle issue with memory allocated on the stack: the code works well with gcc -O0! The bug only triggers with gcc -O3.
Date User Action Args
2019-08-23 09:39:47vstinnersetrecipients: + vstinner, hroncok
2019-08-23 09:39:47vstinnersetmessageid: <>
2019-08-23 09:39:47vstinnerlinkissue37926 messages
2019-08-23 09:39:46vstinnercreate