public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [Bug default/29610] New: support reading an ocaml abixml symbol table table where a function symbol aliases a variable symbol
@ 2022-09-25  3:59 dodji at redhat dot com
  2022-10-11 20:19 ` [Bug default/29610] " woodard at redhat dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: dodji at redhat dot com @ 2022-09-25  3:59 UTC (permalink / raw)
  To: libabigail

https://sourceware.org/bugzilla/show_bug.cgi?id=29610

            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=14357&action=edit
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 symbol
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 then 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

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-04-04 15:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-25  3:59 [Bug default/29610] New: support reading an ocaml abixml symbol table table where a function symbol aliases a variable symbol dodji at redhat dot com
2022-10-11 20:19 ` [Bug default/29610] " woodard at redhat dot com
2023-01-07  0:43 ` woodard at redhat dot com
2023-03-24 17:41 ` dodji at redhat dot com
2023-03-27 19:13 ` woodard at redhat dot com
2023-04-11 14:44 ` dodji at redhat dot com
2023-04-11 14:46 ` dodji at redhat dot com
2023-04-11 14:49 ` dodji at redhat dot com
2023-04-11 15:41 ` dodji at redhat dot com
2024-04-04  9:35 ` dodji at seketeli dot org
2024-04-04 15:14 ` dodji at seketeli dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).