Skip to content

Commit 66c0d0a

Browse files
[3.11] gh-104736: Fix test_gdb tests on ppc64le with clang (GH-109360) (#109362)
gh-104736: Fix test_gdb tests on ppc64le with clang (GH-109360) Fix test_gdb on Python built with LLVM clang 16 on Linux ppc64le (ex: Fedora 38). Search patterns in gdb "bt" command output to detect when gdb fails to retrieve the traceback. For example, skip a test if "Backtrace stopped: frame did not save the PC" is found. (cherry picked from commit 44d9a71) Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent df21fdc commit 66c0d0a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Lib/test/test_gdb.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,14 @@ def get_stack_trace(self, source=None, script=None,
246246
# gh-91960: On Python built with "clang -Og", gdb gets
247247
# "frame=<optimized out>" for _PyEval_EvalFrameDefault() parameter
248248
'(unable to read python frame information)',
249+
# gh-104736: On Python built with "clang -Og" on ppc64le,
250+
# "py-bt" displays a truncated or not traceback, but "where"
251+
# logs this error message:
252+
'Backtrace stopped: frame did not save the PC',
253+
# gh-104736: When "bt" command displays something like:
254+
# "#1 0x0000000000000000 in ?? ()", the traceback is likely
255+
# truncated or wrong.
256+
' ?? ()',
249257
):
250258
if pattern in out:
251259
raise unittest.SkipTest(f"{pattern!r} found in gdb output")
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Fix test_gdb on Python built with LLVM clang 16 on Linux ppc64le (ex: Fedora
2+
38). Search patterns in gdb "bt" command output to detect when gdb fails to
3+
retrieve the traceback. For example, skip a test if ``Backtrace stopped: frame
4+
did not save the PC`` is found. Patch by Victor Stinner.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy