bpo-43271: Re-enable ceval.c optimizations for Windows debug builds (GH-24739)

Partially reverts commit b74396c316

The optimizations are necessary to prevent the interpreter from
crashing in a number of tests involving recursion.
This commit is contained in:
db3l 2021-03-03 22:09:48 -05:00 committed by GitHub
parent 8747c1f233
commit 131d551640
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -182,8 +182,9 @@ typedef int Py_ssize_clean_t;
*/
#if defined(_MSC_VER)
# if defined(PY_LOCAL_AGGRESSIVE) && !defined(Py_DEBUG)
# if defined(PY_LOCAL_AGGRESSIVE)
/* enable more aggressive optimization for MSVC */
/* active in both release and debug builds - see bpo-43271 */
# pragma optimize("gt", on)
#endif
/* ignore warnings if the compiler decides not to inline a function */

View file

@ -7,6 +7,7 @@
*/
/* enable more aggressive intra-module optimizations, where available */
/* affects both release and debug builds - see bpo-43271 */
#define PY_LOCAL_AGGRESSIVE
#include "Python.h"