]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-144741: Fix test_frame_pointer_unwind for libpython (#145499)
authorVictor Stinner <vstinner@python.org>
Wed, 4 Mar 2026 17:29:02 +0000 (18:29 +0100)
committerGitHub <noreply@github.com>
Wed, 4 Mar 2026 17:29:02 +0000 (18:29 +0100)
Fix test_frame_pointer_unwind when Python is built with
--enable-shared. Classify also libpython frames as "python".

Misc/NEWS.d/next/Tests/2026-03-04-17-39-15.gh-issue-144741.0RHhBF.rst [new file with mode: 0644]
Modules/_testinternalcapi.c

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 (file)
index 0000000..be3092f
--- /dev/null
@@ -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.
index 22cfa3f58a9d8342a0b981be4a412b361a1185ed..998bf5e592e8ee0f01ee2560678e6c068f7c4d65 100644 (file)
@@ -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