From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25086 invoked by alias); 30 May 2018 09:29:42 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 24960 invoked by uid 48); 30 May 2018 09:29:29 -0000 From: "mark at klomp dot org" To: elfutils-devel@sourceware.org Subject: [Bug tools/23247] Segfault in 0.171 RC1 release candidate Date: Wed, 30 May 2018 09:29:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: tools X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mark at klomp dot org X-Bugzilla-Status: UNCONFIRMED 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: cc 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-SW-Source: 2018-q2/txt/msg00107.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D23247 Mark Wielaard changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mark at klomp dot org --- Comment #1 from Mark Wielaard --- Thanks, for some reason we used the wrong listptr for locview attributes. This fixes it: diff --git a/src/readelf.c b/src/readelf.c index 2ccbea5..6f2f637 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -9244,7 +9244,7 @@ print_debug_loc_section (Dwfl_Module *dwflmod, if (attr =3D=3D DW_AT_GNU_locviews) { - Dwarf_Off next_off =3D next_listptr_offset (&known_loclistsptr, + Dwarf_Off next_off =3D next_listptr_offset (&known_locsptr, listptr_idx); const unsigned char *locp =3D readp; const unsigned char *locendp; While looking at this I also noticed that for this test file eu-readelf --debug-dump=3Dranges claims to find some unused garbage in .debug_ranges, = which might indicate that we are either missing some attributes in the associated= CU, or GCC really puts garbage in the .debug_ranges section (which would surpri= se me). --=20 You are receiving this mail because: You are on the CC list for the bug.