File gh-144741-frame_pointer_unwind.patch of Package python315

From 88fee2ced3b9086726c732a27a04605b3c20bf43 Mon Sep 17 00:00:00 2001
From: Victor Stinner <vstinner@python.org>
Date: Wed, 4 Mar 2026 17:36:32 +0100
Subject: [PATCH] gh-144741: Fix test_frame_pointer_unwind for libpython

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 |    3 +++
 Modules/_testinternalcapi.c                                           |    4 ++++
 2 files changed, 7 insertions(+)
 create mode 100644 Misc/NEWS.d/next/Tests/2026-03-04-17-39-15.gh-issue-144741.0RHhBF.rst

Index: Python-3.15.0a7/Misc/NEWS.d/next/Tests/2026-03-04-17-39-15.gh-issue-144741.0RHhBF.rst
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ Python-3.15.0a7/Misc/NEWS.d/next/Tests/2026-03-04-17-39-15.gh-issue-144741.0RHhBF.rst	2026-03-20 22:54:11.654548302 +0100
@@ -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: Python-3.15.0a7/Modules/_testinternalcapi.c
===================================================================
--- Python-3.15.0a7.orig/Modules/_testinternalcapi.c	2026-03-10 13:31:15.000000000 +0100
+++ Python-3.15.0a7/Modules/_testinternalcapi.c	2026-03-20 22:54:11.655017838 +0100
@@ -200,6 +200,10 @@
         if (strncmp(base, "libpython", 9) == 0) {
             return "python";
         }
+        // Match "libpython3.15.so.1.0"
+        if (strncmp(base, "libpython", 9) == 0) {
+            return "python";
+        }
         return "other";
     }
 #ifdef _Py_JIT
openSUSE Build Service is sponsored by