public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "blarsen at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug python/28856] Python pretty printer causes stack overflow when printing frame arguments
Date: Mon, 07 Feb 2022 17:51:38 +0000	[thread overview]
Message-ID: <bug-28856-4717-UT4WM3wpep@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28856-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=28856

B. Larsen <blarsen at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |blarsen at redhat dot com

--- Comment #6 from B. Larsen <blarsen at redhat dot com> ---
I have managed to reproduce the crash without using the pretty printer. In
fact, all I need to reproduce is:

gdb -q ec -ex start -ex n -ex s -ex bt

and it crashes using backtrace, up or finish. What I found while trying to
debug this is that there is a corruption in the linked list, creating the
following entry:

1: *this_frame = {level = 0, pspace = 0x0, aspace = 0x26b6d00, prologue_cache =
0x0, unwind = 0x0, prev_arch = {p = false, arch = 0x0}, prev_pc = {status =
CC_UNKNOWN, masked = false, value = 0x0}, prev_func = {addr = 0x40113c, status
= CC_VALUE}, this_id = {p = frame_id_status::COMPUTED, value = {stack_addr =
0x0, code_addr = 0x0, special_addr = 0x0, stack_status = FID_STACK_SENTINEL,
code_addr_p = 0, special_addr_p = 1, artificial_depth = 0}}, base = 0x0,
base_cache = 0x0, next = 0x288fee0, prev_p = true, prev = 0x288ffb0,
stop_reason = UNWIND_NO_REASON, stop_string = 0x0}

(top-gdb) p this_frame
$2 = (frame_info *) 0x288fee0

I haven't tracked down where this is happening, but my guess is somewhere
during the step process.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2022-02-07 17:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03 11:45 [Bug python/28856] New: " jwakely.gcc at gmail dot com
2022-02-03 11:46 ` [Bug python/28856] " jwakely.gcc at gmail dot com
2022-02-03 11:49 ` jwakely.gcc at gmail dot com
2022-02-03 12:02 ` fweimer at redhat dot com
2022-02-03 19:01 ` ssbssa at sourceware dot org
2022-02-03 20:50 ` jwakely.gcc at gmail dot com
2022-02-03 21:15 ` ssbssa at sourceware dot org
2022-02-03 21:29 ` simark at simark dot ca
2022-02-03 22:19 ` jwakely.gcc at gmail dot com
2022-02-07 17:51 ` blarsen at redhat dot com [this message]
2022-03-21 13:23 ` cvs-commit at gcc dot gnu.org
2022-03-24 14:28 ` simon.marchi at polymtl dot ca
2022-10-10 10:14 ` cvs-commit at gcc dot gnu.org
2022-10-10 10:23 ` blarsen at redhat dot com
2023-08-03 15:59 ` tromey at sourceware dot org
2024-01-13 18:50 ` ssbssa at sourceware dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-28856-4717-UT4WM3wpep@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).