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".
This commit is contained in:
Victor Stinner 2026-03-04 18:29:02 +01:00 committed by GitHub
parent 18aec59fe5
commit a00392349c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View file

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

View 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