From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 61823 invoked by alias); 30 May 2018 10:14:29 -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 61798 invoked by uid 48); 30 May 2018 10:14:24 -0000 From: "mliska at suse dot cz" To: elfutils-devel@sourceware.org Subject: [Bug tools/23247] Segfault in 0.171 RC1 release candidate Date: Wed, 30 May 2018 10:14: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: mliska at suse dot cz 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: 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/msg00110.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D23247 --- Comment #3 from Martin Liska --- (In reply to Mark Wielaard from comment #1) > Thanks, for some reason we used the wrong listptr for locview attributes. > This fixes it: >=20 > 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, >=20=20 > 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; >=20 > 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 surprise me). I can confirm it works for me! Thanks. --=20 You are receiving this mail because: You are on the CC list for the bug.