This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients hroncok, vstinner
Date 2019-08-23.09:39:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1566553187.03.0.785369353582.issue37926@roundup.psfhosted.org>
In-reply-to
Content
Oops, it's my fault! PR 15415 fix the crash.

The regression was introduced by:

commit 74f6568bbd3e70806ea3219e8bacb386ad802ccf
Author: Victor Stinner <vstinner@redhat.com>
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.
History
Date User Action Args
2019-08-23 09:39:47vstinnersetrecipients: + vstinner, hroncok
2019-08-23 09:39:47vstinnersetmessageid: <1566553187.03.0.785369353582.issue37926@roundup.psfhosted.org>
2019-08-23 09:39:47vstinnerlinkissue37926 messages
2019-08-23 09:39:46vstinnercreate