]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-96572: fix use after free in trace refs build mode (#96618)
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Tue, 6 Sep 2022 18:02:41 +0000 (23:32 +0530)
committerGitHub <noreply@github.com>
Tue, 6 Sep 2022 18:02:41 +0000 (11:02 -0700)
Misc/NEWS.d/next/Core and Builtins/2022-09-06-16-54-49.gh-issue-96572.8DRsaW.rst [new file with mode: 0644]
Python/ceval.c

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 (file)
index 0000000..44cceb4
--- /dev/null
@@ -0,0 +1 @@
+Fix use after free in trace refs build mode. Patch by Kumar Aditya.
index c2fa90853592df3c3e656708341b153d0051b702..971f6f177c98cf033980981765d490d99f9f60ad 100644 (file)
@@ -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.