From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B1CCF3861843; Wed, 8 Sep 2021 16:01:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B1CCF3861843 From: "mark at klomp dot org" To: elfutils-devel@sourceware.org Subject: [Bug libdw/28220] dwarf_location_attr returns high-bit junk from .debug_addr when fetching 32-bit addresses Date: Wed, 08 Sep 2021 16:01:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: libdw X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mark at klomp dot org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Sep 2021 16:01:09 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28220 --- Comment #4 from Mark Wielaard --- Turns out we could have caught this with the varlocs testcase. Before the fix: $ for i in testfile-vars-*.o; do echo $i; tests/varlocs --debug --exprlocs = -e $i | grep exprloc; done testfile-vars-clang-dwarf4-32.o location (exprloc) {addr(0x0)} location (exprloc) {addr(0x4)} testfile-vars-clang-dwarf4-64.o location (exprloc) {addr(0x0)} location (exprloc) {addr(0x4)} testfile-vars-clang-dwarf5-32.o location (exprloc) {addr: 0x400000000} location (exprloc) {addr: 0x616c630000000004} testfile-vars-clang-dwarf5-64.o location (exprloc) {addr: 0x0} location (exprloc) {addr: 0x4} testfile-vars-gcc-dwarf4-32.o location (exprloc) {addr(0x0)} location (exprloc) {addr(0x4)} testfile-vars-gcc-dwarf4-64.o location (exprloc) {addr(0x0)} location (exprloc) {addr(0x4)} testfile-vars-gcc-dwarf5-32.o location (exprloc) {addr(0x0)} location (exprloc) {addr(0x4)} testfile-vars-gcc-dwarf5-64.o location (exprloc) {addr(0x0)} location (exprloc) {addr(0x4)} With the patch: $ for i in testfile-vars-*.o; do echo $i; LD_LIBRARY_PATH=3Dlibelf:libdw tests/varlocs --debug --exprlocs -e $i | grep exprloc; done testfile-vars-clang-dwarf4-32.o location (exprloc) {addr(0x0)} location (exprloc) {addr(0x4)} testfile-vars-clang-dwarf4-64.o location (exprloc) {addr(0x0)} location (exprloc) {addr(0x4)} testfile-vars-clang-dwarf5-32.o location (exprloc) {addr: 0x0} location (exprloc) {addr: 0x4} testfile-vars-clang-dwarf5-64.o location (exprloc) {addr: 0x0} location (exprloc) {addr: 0x4} testfile-vars-gcc-dwarf4-32.o location (exprloc) {addr(0x0)} location (exprloc) {addr(0x4)} testfile-vars-gcc-dwarf4-64.o location (exprloc) {addr(0x0)} location (exprloc) {addr(0x4)} testfile-vars-gcc-dwarf5-32.o location (exprloc) {addr(0x0)} location (exprloc) {addr(0x4)} testfile-vars-gcc-dwarf5-64.o location (exprloc) {addr(0x0)} location (exprloc) {addr(0x4)} --=20 You are receiving this mail because: You are on the CC list for the bug.=