From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6CA233858C83; Sun, 25 Sep 2022 03:59:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6CA233858C83 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1664078352; bh=xrI36K50cjixGSqfypR//ZBwwqLQ2pizaReksbdJpio=; h=From:To:Subject:Date:From; b=FEQD5n54Abo9modzD5FW/y6HAQ19KgkTeoeRdALkwaoVgjpHa7B27fc5u1B+H7xay tRW9TNfq588lKF7bjjftfjX9JqM68CgiS/JkQhWWSns+Hy9gOqF+ZH+PrNO5uI57Up V159kqdopkq33vog7vR+wC7n3WmpmpFvSucgbfwA= From: "dodji at redhat dot com" To: libabigail@sourceware.org Subject: [Bug default/29610] New: support reading an ocaml abixml symbol table table where a function symbol aliases a variable symbol Date: Sun, 25 Sep 2022 03:59:11 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: libabigail X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dodji at redhat dot com 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone attachments.created Message-ID: 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29610 Bug ID: 29610 Summary: support reading an ocaml abixml symbol table table where a function symbol aliases a variable symbol Product: libabigail Version: unspecified Status: NEW Severity: normal Priority: P2 Component: default Assignee: dodji at redhat dot com Reporter: dodji at redhat dot com CC: libabigail at sourceware dot org Target Milestone: --- Created attachment 14357 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D14357&action=3Ded= it Shell script reproducer Apparently in ELF files generated by Ocaml, a function symbol can alias a variable symbol, at least on s390 and ppc64le. This is not yet supported by libabigail's abixml reader as it assumes that a function symbol can only alias another function symbol, and similarly for variable symbols. In abg-reader.cc, build_elf_symbol_db is called to build either a variable = or function symbol and return it. It expects that the resulting function symb= ol map or variable symbol map is self-contained. In other words, if a symbol = from a given map aliases another one, then the aliased symbol is also part of the same map. To support having one kind of symbol alias the other kind, build_elf_symbol should also return a map of symbols aliases that are not yet resolved. Then, read_symbol_db_from_input (which calls build_elf_symbol_db) would the= n do the work of resolving the still-not-resolved aliased symbol, i.e, making a function symbol potentially alias a variable symbol and vice versa. A reproducer shell script is attached. It reproduces the issue on the usr/bin/virt-get-kernel binary of the guestfs-tools-1.48.2-1.fc36.s390x.rpm package. So, it downloads the package from the Fedora Koji build system, unpacks it = and runs abidw --abidiff on it. The execution violates an assert in build_elf_symbol_db --=20 You are receiving this mail because: You are on the CC list for the bug.=