Bug#968670: dwz: Fails with "Unknown DWARF DW_OP_1" (more info needed)
It is the same on arm64 too, eg: https://buildd.debian.org/status/package.php?p=qemu=bullseye-backports /mjt
Bug#968670: dwz: Fails with "Unknown DWARF DW_OP_1" (more info needed)
On Sat, 6 Feb 2021 08:54:57 +0100 Dennis Filder wrote: Control: tag -1 - patch + moreinfo After looking into this some more, I don't think this is necessarily a bug in dwz, but it could also be either someone using rogue DW_OP_* definitions with values 0x00 and 0x01 or a buggy compiler/assembler backend emitting junk. While applying the patch probably won't hurt, it will most probably not help either. This prob now started appearing on ppc64el and s390x buildds on regular bullseye builds, f.e. https://buildd.debian.org/status/fetch.php?pkg=qemu=s390x=1%3A7.0%2Bdfsg-2%7Ebpo11%2B1=1651985111=0 https://buildd.debian.org/status/fetch.php?pkg=qemu=ppc64el=1%3A7.0%2Bdfsg-2%7Ebpo11%2B1=1651980296=0 dh_dwz -a -a dwz: debian/qemu-system-misc/usr/bin/qemu-system-alpha: Unknown DWARF DW_OP_0 dwz: debian/qemu-system-misc/usr/bin/qemu-system-hppa: Unknown DWARF DW_OP_0 dwz: debian/qemu-system-misc/usr/bin/qemu-system-riscv32: Unknown DWARF DW_OP_0 dwz: debian/qemu-system-misc/usr/bin/qemu-system-riscv64: Unknown DWARF DW_OP_0 dwz: debian/qemu-system-misc/usr/bin/qemu-system-s390x: Unknown DWARF DW_OP_0 dwz: debian/qemu-system-misc/usr/bin/qemu-system-sh4: Unknown DWARF DW_OP_0 dwz: debian/qemu-system-misc/usr/bin/qemu-system-sh4eb: Unknown DWARF DW_OP_0 dwz: debian/qemu-system-misc/usr/bin/qemu-system-xtensa: Unknown DWARF DW_OP_0 dwz: debian/qemu-system-misc/usr/bin/qemu-system-xtensaeb: Unknown DWARF DW_OP_0 dh_dwz: error: dwz -mdebian/qemu-system-misc/usr/lib/debug/.dwz/powerpc64le-linux-gnu/qemu-system-misc.debug -M/usr/lib/debug/.dwz/powerpc64le-linux-gnu/qemu-system-misc.debug -- debian/qemu-system-misc/usr/bin/qemu-system-alpha debian/qemu-system-misc/usr/bin/qemu-system-avr debian/qemu-system-misc/usr/bin/qemu-system-cris debian/qemu-system-misc/usr/bin/qemu-system-hppa debian/qemu-system-misc/usr/bin/qemu-system-m68k debian/qemu-system-misc/usr/bin/qemu-system-microblaze debian/qemu-system-misc/usr/bin/qemu-system-microblazeel debian/qemu-system-misc/usr/bin/qemu-system-nios2 debian/qemu-system-misc/usr/bin/qemu-system-or1k debian/qemu-system-misc/usr/bin/qemu-system-riscv32 debian/qemu-system-misc/usr/bin/qemu-system-riscv64 debian/qemu-system-misc/usr/bin/qemu-system-rx debian/qemu-system-misc/usr/bin/qemu-system-s390x debian/qemu-system-misc/usr/bin/qemu-system-sh4 debian/qemu-system-misc/usr/bin/qemu-system-sh4eb debian/qemu-system-misc/usr/bin/qemu-system-tricore debian/qemu-system-misc/usr/bin/qemu-system-xtensa debian/qemu-system-misc/usr/bin/qemu-system-xtensaeb returned exit code 1 make[1]: *** [debian/rules:636: install-arch] Error 25 (it is DW_OP_0 not DW_OP_1, but since the above note suggests both should not be seen "in wild", maybe these are related). Is dwz or compiler broken on bullseye? Thanks, /mjt
Bug#968670: dwz: Fails with "Unknown DWARF DW_OP_1" (more info needed)
Control: tag -1 - patch + moreinfo After looking into this some more, I don't think this is necessarily a bug in dwz, but it could also be either someone using rogue DW_OP_* definitions with values 0x00 and 0x01 or a buggy compiler/assembler backend emitting junk. While applying the patch probably won't hurt, it will most probably not help either. @Diego: Could you still provide us with the unstripped shared library? That would make tracking this down much easier. Regards, Dennis
Bug#968670: dwz: Fails with "Unknown DWARF DW_OP_1"
Control: tag + upstream patch X-Debbugs-Cc: d.fil...@web.de dwz source code comes with outdated (August 2019) copies of dwarf2.def, dwarf2.h and dwarfnames.c from gcc/libiberty. The patch updates them and proposes a long-term solution. Hopefully this will fix any dh_dwz issues. Regards, Dennis. Description: Update DWARF definition files to latest gcc master Upstream devs haven't updated some files copied from gcc/libiberty in a while. This patch for dwz/0.13-2 updates them to the ones in gcc master@b2d84e9f9cccbe4ee662f7002b83105629d09939 allowing it to recognize newly introduced DWARF tags produced by current gcc/binutils/etc. . A better approach would build-depend on libiberty-dev (20210106-1 has them), include/copy them and update COPYRIGHT_YEARS with contrib/release/gen-copyright-years.sh. Author: Dennis Filder Bug-Debian: https://bugs.debian.org/968670 Last-Update: 2021-02-05 --- diff -u -r dwz-0.13+20210126/COPYRIGHT_YEARS dwz-0.13+20210126/COPYRIGHT_YEARS --- dwz-0.13+20210126/COPYRIGHT_YEARS 2021-01-19 08:36:09.0 +0100 +++ dwz-0.13+20210126/COPYRIGHT_YEARS 2021-02-05 20:31:33.0 +0100 @@ -1,3 +1,3 @@ --DFSF_YEARS='"1992-2019"' +-DFSF_YEARS='"1992-2021"' -DRH_YEARS='"2001-2021"' -DSUSE_YEARS='"2019"' diff -u -r dwz-0.13+20210126/dwarf2.def dwz-0.13+20210126/dwarf2.def --- dwz-0.13+20210126/dwarf2.def 2019-08-11 17:16:07.0 +0200 +++ dwz-0.13+20210126/dwarf2.def 2021-02-05 20:31:09.0 +0100 @@ -1,7 +1,7 @@ /* -*- c -*- Declarations and definitions of codes relating to the DWARF2 and DWARF3 symbolic debugging information formats. - Copyright (C) 1992-2019 Free Software Foundation, Inc. + Copyright (C) 1992-2021 Free Software Foundation, Inc. Written by Gary Funck (g...@intrepid.com) The Ada Joint Program Office (AJPO), Florida State University and Silicon Graphics Inc. @@ -805,3 +805,14 @@ DW_IDX (DW_IDX_GNU_internal, 0x2000) DW_IDX (DW_IDX_GNU_external, 0x2001) DW_END_IDX + +/* DWARF5 Unit type header encodings */ +DW_FIRST_UT (DW_UT_compile, 0x01) +DW_UT (DW_UT_type, 0x02) +DW_UT (DW_UT_partial, 0x03) +DW_UT (DW_UT_skeleton, 0x04) +DW_UT (DW_UT_split_compile, 0x05) +DW_UT (DW_UT_split_type, 0x06) +DW_UT (DW_UT_lo_user, 0x80) +DW_UT (DW_UT_hi_user, 0xff) +DW_END_UT diff -u -r dwz-0.13+20210126/dwarf2.h dwz-0.13+20210126/dwarf2.h --- dwz-0.13+20210126/dwarf2.h 2019-08-11 17:16:07.0 +0200 +++ dwz-0.13+20210126/dwarf2.h 2021-02-05 20:31:17.0 +0100 @@ -1,6 +1,6 @@ /* Declarations and definitions of codes relating to the DWARF2 and DWARF3 symbolic debugging information formats. - Copyright (C) 1992-2019 Free Software Foundation, Inc. + Copyright (C) 1992-2021 Free Software Foundation, Inc. Written by Gary Funck (g...@intrepid.com) The Ada Joint Program Office (AJPO), Florida State University and Silicon Graphics Inc. @@ -55,6 +55,7 @@ #define DW_CFA_DUP(name, value) , name = value #define DW_IDX(name, value) , name = value #define DW_IDX_DUP(name, value) , name = value +#define DW_UT(name, value) , name = value #define DW_FIRST_TAG(name, value) enum dwarf_tag { \ name = value @@ -77,6 +78,9 @@ #define DW_FIRST_IDX(name, value) enum dwarf_name_index_attribute { \ name = value #define DW_END_IDX }; +#define DW_FIRST_UT(name, value) enum dwarf_unit_type { \ + name = value +#define DW_END_UT }; #include "dwarf2.def" @@ -94,6 +98,8 @@ #undef DW_END_CFA #undef DW_FIRST_IDX #undef DW_END_IDX +#undef DW_FIRST_UT +#undef DW_END_UT #undef DW_TAG #undef DW_TAG_DUP @@ -108,6 +114,7 @@ #undef DW_CFA_DUP #undef DW_IDX #undef DW_IDX_DUP +#undef DW_UT /* Flag that tells whether entry has a child or not. */ #define DW_children_no 0 @@ -316,7 +323,6 @@ #define DW_CIE_ID 0x #define DW64_CIE_ID 0xULL -#define DW_CIE_VERSION 1 #define DW_CFA_extended 0 @@ -451,19 +457,6 @@ DW_RLE_start_end = 0x06, DW_RLE_start_length = 0x07 }; - -/* Unit types in unit_type unit header field. */ -enum dwarf_unit_type - { -DW_UT_compile = 0x01, -DW_UT_type = 0x02, -DW_UT_partial = 0x03, -DW_UT_skeleton = 0x04, -DW_UT_split_compile = 0x05, -DW_UT_split_type = 0x06, -DW_UT_lo_user = 0x80, -DW_UT_hi_user = 0xff - }; /* @@@ For use with GNU frame unwind information. */ @@ -489,19 +482,36 @@ #define DW_EH_PE_indirect 0x80 /* Codes for the debug sections in a dwarf package (.dwp) file. - Extensions for Fission. See http://gcc.gnu.org/wiki/DebugFissionDWP. */ + (From the pre-standard formats Extensions for Fission. + See http://gcc.gnu.org/wiki/DebugFissionDWP). */ enum dwarf_sect - { -DW_SECT_INFO = 1, -DW_SECT_TYPES = 2, -DW_SECT_ABBREV = 3, -DW_SECT_LINE = 4, -DW_SECT_LOC = 5, -DW_SECT_STR_OFFSETS = 6, -DW_SECT_MACINFO = 7, -DW_SECT_MACRO = 8, -DW_SECT_MAX = 8 - }; +{ + DW_SECT_INFO = 1, + DW_SECT_TYPES = 2, + DW_SECT_ABBREV = 3, + DW_SECT_LINE = 4, + DW_SECT_LOC = 5,
Bug#968670: dwz: Fails with "Unknown DWARF DW_OP_1"
Package: dwz Version: 0.13-5 Severity: normal X-Debbugs-Cc: qdcois...@relay.firefox.com Hi, I'm building a package for the liboqs library, a post quantum algorithms library, for being proposed to be included in the archives, and when I run the build it fails with "Unknown DWARF DW_OP_1". This package can be built using Docker and I let a commit with the broken state at https://github.com/lacchain/liboqs-debian/commit/482cb19fcca9449b286bb597b9b0e14ba0b7 I can provide the liboqs shared library on request if you can't reproduce it. Best regards, Diego -- System Information: Debian Release: bullseye/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 4.19.76-linuxkit (SMP w/4 CPU threads) Kernel taint flags: TAINT_RANDSTRUCT Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /bin/dash Init: unable to detect Versions of packages dwz depends on: ii libc62.31-1 ii libelf1 0.176-1.1 dwz recommends no packages. dwz suggests no packages. -- no debconf information