From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D2E653857023; Sat, 9 Jul 2022 20:13:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D2E653857023 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:13:57 +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: 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-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:13:57 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29346 Mark Wielaard changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mark at klomp dot org --- Comment #1 from Mark Wielaard --- > Thread 1 "abipkgdiff" received signal SIGFPE, Arithmetic exception. > 0x00007ffff7e37aa3 in abigail::dwarf_reader::get_soname_of_elf_file > (path=3D"/home/ben/.cache/libabigail/abipkgdiff-tmp-dir-ipFB18/package1/u= sr/lib64/aisleriot/guile/3.0/yield.go", soname=3D"") at ../../../libabigail= /src/abg-dwarf-reader.cc:16638 > 16638 ? shdr->sh_size / shdr->sh_entsize : INT_= MAX); The issue is that the yield.go file (a guile generated ELF file) has sh_ent= size of zero for the .dynamic section. I think that is a bug in guile. And it is slightly questionable that abipkgdiff tries to diff the abi of a generated guile file. But something like the following should fix it (untested): diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc index 32a2cead..f08f194b 100644 --- a/src/abg-dwarf-reader.cc +++ b/src/abg-dwarf-reader.cc @@ -16634,6 +16634,8 @@ 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->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); ABG_ASSERT (shdr =3D=3D NULL || shdr->sh_type =3D=3D SHT_DYNAMIC= ); --=20 You are receiving this mail because: You are on the CC list for the bug.=