From: Victor Stinner Date: Wed, 4 Mar 2026 17:29:02 +0000 (+0100) Subject: gh-144741: Fix test_frame_pointer_unwind for libpython (#145499) X-Git-Tag: v3.15.0a7~74 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a00392349c8cccdf2fe720fe46e504699f584f02;p=thirdparty%2FPython%2Fcpython.git gh-144741: Fix test_frame_pointer_unwind for libpython (#145499) Fix test_frame_pointer_unwind when Python is built with --enable-shared. Classify also libpython frames as "python". --- diff --git a/Misc/NEWS.d/next/Tests/2026-03-04-17-39-15.gh-issue-144741.0RHhBF.rst b/Misc/NEWS.d/next/Tests/2026-03-04-17-39-15.gh-issue-144741.0RHhBF.rst new file mode 100644 index 000000000000..be3092f1c259 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2026-03-04-17-39-15.gh-issue-144741.0RHhBF.rst @@ -0,0 +1,3 @@ +Fix ``test_frame_pointer_unwind`` when Python is built with +:option:`--enable-shared`. Classify also libpython frames as ``"python"``. +Patch by Victor Stinner. diff --git a/Modules/_testinternalcapi.c b/Modules/_testinternalcapi.c index 22cfa3f58a9d..998bf5e592e8 100644 --- a/Modules/_testinternalcapi.c +++ b/Modules/_testinternalcapi.c @@ -196,6 +196,10 @@ classify_address(uintptr_t addr, int jit_enabled, PyInterpreterState *interp) if (strncmp(base, "python", 6) == 0) { return "python"; } + // Match "libpython3.15.so.1.0" + if (strncmp(base, "libpython", 9) == 0) { + return "python"; + } return "other"; } #ifdef _Py_JIT