public inbox for debugedit@sourceware.org
 help / color / mirror / Atom feed
From: contact@lsferreira.net
To: "Luís Ferreira" <contact@lsferreira.net>
Cc: debugedit@sourceware.org
Subject: Re: [PATCH] debugedit: Don't hang on DW_FORM_strx references
Date: Thu, 10 Nov 2022 18:28:38 +0000	[thread overview]
Message-ID: <Qn1zzdNW5raphRL2ll6u5me2VUJADwleXZaBCggRUHYG-jMQEq4wV7OvW63DO9sxrUr4t-HjJ2ByS37qdA6ZCoVw3pluNWi-dczLdbfLfeM=@lsferreira.net> (raw)
In-Reply-To: <20221110181759.63673-1-contact@lsferreira.net>

Related to issue https://sourceware.org/bugzilla/show_bug.cgi?id=28728 and its duplicate https://sourceware.org/bugzilla/show_bug.cgi?id=29773 .



------- Original Message -------
On Thursday, November 10th, 2022 at 6:17 PM, Luís Ferreira <contact@lsferreira.net> wrote:


> 
> 
> Compilers that generate DWARF5 can write to .debug_info a DW_FORM_strx
> reference. The code seem to handle it but hangs on the abbreviation
> sanity check.
> 
> Signed-off-by: Luís Ferreira contact@lsferreira.net
> 
> ---
> tools/debugedit.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/debugedit.c b/tools/debugedit.c
> index d82ae5a..4450b34 100644
> --- a/tools/debugedit.c
> +++ b/tools/debugedit.c
> @@ -778,12 +778,17 @@ no_memory:
> || form == DW_FORM_line_strp
> || form == DW_FORM_implicit_const
> || form == DW_FORM_addrx
> + || form == DW_FORM_strx
> || form == DW_FORM_loclistx
> || form == DW_FORM_rnglistx
> || form == DW_FORM_addrx1
> || form == DW_FORM_addrx2
> || form == DW_FORM_addrx3
> - || form == DW_FORM_addrx4)))
> + || form == DW_FORM_addrx4
> + || form == DW_FORM_strx1
> + || form == DW_FORM_strx2
> + || form == DW_FORM_strx3
> + || form == DW_FORM_strx4)))
> {
> error (0, 0, "%s: Unknown DWARF DW_FORM_0x%x", dso->filename,
> 
> form);
> --
> 2.38.1

      reply	other threads:[~2022-11-10 18:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-10 18:17 Luís Ferreira
2022-11-10 18:28 ` contact [this message]

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='Qn1zzdNW5raphRL2ll6u5me2VUJADwleXZaBCggRUHYG-jMQEq4wV7OvW63DO9sxrUr4t-HjJ2ByS37qdA6ZCoVw3pluNWi-dczLdbfLfeM=@lsferreira.net' \
    --to=contact@lsferreira.net \
    --cc=debugedit@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).