public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: watashiwaher <watashiwaher@gmail.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Fixing get_builder() function in dwarf2/read.c
Date: Mon, 15 Jun 2020 10:58:06 -0400	[thread overview]
Message-ID: <95d33ff4-2215-d9f1-2093-2f75bb48cd99@simark.ca> (raw)
In-Reply-To: <CAFHDqJM28+N-KYkStTUkY2s+T4MvjK83iALF9+=coG0zZYEpUQ@mail.gmail.com>

On 2020-06-14 1:07 p.m., watashiwaher wrote:
> It is a shame. But it seems I can't. Also I am not so strong in dwarf2.
> The binary was so huge and so private, that I was so dumb to understand what actually inside binary got wrong :(
> All I just noticed, it is that get_builder() calls itself recursively, in such manner:
> ptr1 -> ptr2 -> ptr1 -> ptr2 -> ...
> And tho I made a small patch that:
> 1) eliminate recursion
> 2) uses tortoise algorithm to break out of loop
> All I can say, that I really had a halt in this function due to the recursion, because I debugged that halt in GDB...

Could you at least provide a backtrace of GDB in this endless loop?  Then we
can maybe understand what got it that way and build a reproducer from that.

Simon

  reply	other threads:[~2020-06-15 14:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-14 16:49 watashiwaher
2020-06-14 16:58 ` Simon Marchi
2020-06-14 17:07   ` watashiwaher
2020-06-15 14:58     ` Simon Marchi [this message]
2020-06-15 15:06       ` watashiwaher
2020-06-15 15:13         ` watashiwaher

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=95d33ff4-2215-d9f1-2093-2f75bb48cd99@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=watashiwaher@gmail.com \
    /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).