Bug 27372 - [dwz] DWARF CU type DW_UT_type unhandled -- Could not find DWARF abbreviation <n>
Summary: [dwz] DWARF CU type DW_UT_type unhandled -- Could not find DWARF abbreviation...
Status: RESOLVED FIXED
Alias: None
Product: dwz
Classification: Unclassified
Component: default (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-08 12:54 UTC by Tom de Vries
Modified: 2021-02-09 07:35 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
Project(s) to access:
ssh public key:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom de Vries 2021-02-08 12:54:36 UTC
...
$ gcc -gdwarf-5 -fdebug-types-section ../src/testsuite/dwz.tests/hello.c 
$ ./dwz a.out
./dwz: a.out: DWARF CU type DW_UT_type unhandled
./dwz: a.out: Could not find DWARF abbreviation 8620
....
Comment 1 Tom de Vries 2021-02-08 12:56:46 UTC
Looks like a missing goto fail:
...
diff --git a/dwz.c b/dwz.c
index 10860bf..c0d0003 100644
--- a/dwz.c
+++ b/dwz.c
@@ -6584,9 +6584,11 @@ read_debug_info (DSO *dso, int kind, unsigned int *die_count)
        {
          value = read_8 (ptr);
          if (value != DW_UT_compile && value != DW_UT_partial)
-           error (0, 0, "%s: DWARF CU type %s unhandled", dso->filename,
-                  get_DW_UT_str (value));
-
+           {
+             error (0, 0, "%s: DWARF CU type %s unhandled", dso->filename,
+                    get_DW_UT_str (value));
+             goto fail;
+           }
        }
       else
        {
...
after which we have:
...
$ ./dwz a.out
./dwz: a.out: DWARF CU type DW_UT_type unhandled
...
Comment 2 Mark Wielaard 2021-02-08 14:30:08 UTC
(In reply to Tom de Vries from comment #1)
> Looks like a missing goto fail:
> ...
> diff --git a/dwz.c b/dwz.c
> index 10860bf..c0d0003 100644
> --- a/dwz.c
> +++ b/dwz.c
> @@ -6584,9 +6584,11 @@ read_debug_info (DSO *dso, int kind, unsigned int
> *die_count)
>         {
>           value = read_8 (ptr);
>           if (value != DW_UT_compile && value != DW_UT_partial)
> -           error (0, 0, "%s: DWARF CU type %s unhandled", dso->filename,
> -                  get_DW_UT_str (value));
> -
> +           {
> +             error (0, 0, "%s: DWARF CU type %s unhandled", dso->filename,
> +                    get_DW_UT_str (value));
> +             goto fail;
> +           }
>         }
>        else
>         {
> ...
> after which we have:
> ...
> $ ./dwz a.out
> ./dwz: a.out: DWARF CU type DW_UT_type unhandled
> ...

Yes, please apply. Thanks.