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

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:18 UTC|newest]

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

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=20221110181759.63673-1-contact@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).