public inbox for debugedit@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] debugedit: Don't hang on DW_FORM_strx references
@ 2022-11-10 18:17 Luís Ferreira
  2022-11-10 18:28 ` contact
  0 siblings, 1 reply; 2+ messages in thread
From: Luís Ferreira @ 2022-11-10 18:17 UTC (permalink / raw)
  To: debugedit; +Cc: Luís Ferreira

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] debugedit: Don't hang on DW_FORM_strx references
  2022-11-10 18:17 [PATCH] debugedit: Don't hang on DW_FORM_strx references Luís Ferreira
@ 2022-11-10 18:28 ` contact
  0 siblings, 0 replies; 2+ messages in thread
From: contact @ 2022-11-10 18:28 UTC (permalink / raw)
  To: Luís Ferreira; +Cc: debugedit

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-10 18:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-10 18:17 [PATCH] debugedit: Don't hang on DW_FORM_strx references Luís Ferreira
2022-11-10 18:28 ` contact

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).