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: Sun, 14 Jun 2020 12:58:13 -0400 [thread overview]
Message-ID: <e83ab311-7580-88ed-556b-6a6fddbfa92d@simark.ca> (raw)
In-Reply-To: <CAFHDqJOXn6P_U2gP4FvSJa9NB3kOGQj5P4dan84jPxJJpX9LFg@mail.gmail.com>
On 2020-06-14 12:49 p.m., watashiwaher via Gdb-patches wrote:
> Explanation
> I found that some binaries with debug symbols halt gdb. And the problem was
> in the get_builder() function inside dwarf2/read.c file. The function
> recursively called itself until infinity. So I tried to fix this issue by
> eliminating recursion and adding the check for cycle detection, and
> returning nullptr if cycle detected.
>
> ChangeLog
> 2020-06-15 Slava Mitin <watashiwaher@gmail.com>
>
> * dwarf2/read.c (get_builder): Added check for cycles
Hi!
Thanks for the patch. We try very hard to have a test case checked in for each
fix like this. Would you be able to share a small reproducer (a small program
that makes GDB crash like this) that we could turn into a test case?
Simon
next prev parent reply other threads:[~2020-06-14 16: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 [this message]
2020-06-14 17:07 ` watashiwaher
2020-06-15 14:58 ` Simon Marchi
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=e83ab311-7580-88ed-556b-6a6fddbfa92d@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).