https://github.com/python/cpython/commit/a00392349c8cccdf2fe720fe46e504699f584f02
commit: a00392349c8cccdf2fe720fe46e504699f584f02
branch: main
author: Victor Stinner <[email protected]>
committer: vstinner <[email protected]>
date: 2026-03-04T18:29:02+01:00
summary:

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".

files:
A Misc/NEWS.d/next/Tests/2026-03-04-17-39-15.gh-issue-144741.0RHhBF.rst
M 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
index 00000000000000..be3092f1c2592a
--- /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 22cfa3f58a9d83..998bf5e592e8ee 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

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to