From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 136A938582A7; Sat, 9 Jul 2022 20:29:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 136A938582A7 From: "mark at klomp dot org" To: libabigail@sourceware.org Subject: [Bug default/29346] SIGFPE when doing abipkgdiff --self-check of aisleriot-debuginfo-3.22.21-1.fc36.aarch64.rpm Date: Sat, 09 Jul 2022 20:29:55 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: libabigail X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: mark at klomp dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dodji at redhat dot com 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: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jul 2022 20:29:55 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29346 --- Comment #2 from Mark Wielaard --- I probably should have tried to compile it at least. This actually compiles (but I haven't replicated the original issue): diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc index 32a2cead..f2f06037 100644 --- a/src/abg-dwarf-reader.cc +++ b/src/abg-dwarf-reader.cc @@ -16634,8 +16634,11 @@ get_soname_of_elf_file(const string& path, string &soname) Elf_Scn* scn =3D gelf_offscn (elf, phdr->p_offset); GElf_Shdr shdr_mem; GElf_Shdr* shdr =3D gelf_getshdr (scn, &shdr_mem); + size_t entsize =3D (shdr !=3D NULL && shdr->sh_entsize !=3D 0 + ? shdr->sh_entsize + : gelf_fsize (elf, ELF_T_DYN, 1, EV_CURRENT)); int maxcnt =3D (shdr !=3D NULL - ? shdr->sh_size / shdr->sh_entsize : INT_MAX); + ? shdr->sh_size / entsize : INT_MAX); ABG_ASSERT (shdr =3D=3D NULL || shdr->sh_type =3D=3D SHT_DYNAMIC= ); Elf_Data* data =3D elf_getdata (scn, NULL); if (data =3D=3D NULL) --=20 You are receiving this mail because: You are on the CC list for the bug.=