]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-43271: Re-enable ceval.c optimizations for Windows debug builds (GH-24739)
authordb3l <db3l.net@gmail.com>
Thu, 4 Mar 2021 03:09:48 +0000 (22:09 -0500)
committerGitHub <noreply@github.com>
Thu, 4 Mar 2021 03:09:48 +0000 (19:09 -0800)
Partially reverts commit b74396c3167cc780f01309148db02709bc37b432

The optimizations are necessary to prevent the interpreter from
crashing in a number of tests involving recursion.

Include/pyport.h
Python/ceval.c

index 0993b545dc236c9f8cce470bdb353c4cfae02739..fe27fbc7483229159daaa8cf34a33a8d5e03bb00 100644 (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 */
index 8ec00bc2400fb346dba35943de628d7d565d9c9c..abdea1de09b43cfdc73f56a1a242be78eebc267b 100644 (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"