From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 6 Sep 2022 18:28:18 +0000 (-0700) Subject: GH-96572: fix use after free in trace refs build mode (GH-96618) X-Git-Tag: v3.11.0rc2~19 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a389fdb0958746c4c4ee8849a71a276516f33776;p=thirdparty%2FPython%2Fcpython.git GH-96572: fix use after free in trace refs build mode (GH-96618) (cherry picked from commit 67444902a0f10419a557d0a2d3b8675c31b075a9) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> --- 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 000000000000..44cceb46c28c --- /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 23733b63f3c7..196a706ad9fd 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -44,7 +44,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.