Skip to content

Commit 131d551

Browse files
authored
bpo-43271: Re-enable ceval.c optimizations for Windows debug builds (GH-24739)
Partially reverts commit b74396c The optimizations are necessary to prevent the interpreter from crashing in a number of tests involving recursion.
1 parent 8747c1f commit 131d551

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Include/pyport.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,9 @@ typedef int Py_ssize_clean_t;
182182
*/
183183

184184
#if defined(_MSC_VER)
185-
# if defined(PY_LOCAL_AGGRESSIVE) && !defined(Py_DEBUG)
185+
# if defined(PY_LOCAL_AGGRESSIVE)
186186
/* enable more aggressive optimization for MSVC */
187+
/* active in both release and debug builds - see bpo-43271 */
187188
# pragma optimize("gt", on)
188189
#endif
189190
/* ignore warnings if the compiler decides not to inline a function */

Python/ceval.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88

99
/* enable more aggressive intra-module optimizations, where available */
10+
/* affects both release and debug builds - see bpo-43271 */
1011
#define PY_LOCAL_AGGRESSIVE
1112

1213
#include "Python.h"

0 commit comments

Comments
 (0)