summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS.d/next/Core and Builtins/2022-09-06-16-54-49.gh-issue-96572.8DRsaW.rst1
-rw-r--r--Python/ceval.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2022-09-06-16-54-49.gh-issue-96572.8DRsaW.rst b/Misc/NEWS.d/next/Core and Builtins/2022-09-06-16-54-49.gh-issue-96572.8DRsaW.rst
new file mode 100644
index 0000000..44cceb4
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2022-09-06-16-54-49.gh-issue-96572.8DRsaW.rst
@@ -0,0 +1 @@
+Fix use after free in trace refs build mode. Patch by Kumar Aditya.
diff --git a/Python/ceval.c b/Python/ceval.c
index c2fa908..971f6f1 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -46,7 +46,7 @@
# error "ceval.c must be build with Py_BUILD_CORE define for best performance"
#endif
-#ifndef Py_DEBUG
+#if !defined(Py_DEBUG) && !defined(Py_TRACE_REFS)
// GH-89279: The MSVC compiler does not inline these static inline functions
// in PGO build in _PyEval_EvalFrameDefault(), because this function is over
// the limit of PGO, and that limit cannot be configured.