public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: "Frank Ch. Eigler" <fche@redhat.com>
To: Dodji Seketeli <dodji@seketeli.org>
Cc: libabigail@sourceware.org, woodard@redhat.com
Subject: Re: idea: abigail abixml archive
Date: Tue, 5 Dec 2023 19:14:40 -0500	[thread overview]
Message-ID: <20231206001440.GA12666@redhat.com> (raw)
In-Reply-To: <87ttpkvv2s.fsf@seketeli.org>

Hi -

Having gone quiet for a few weeks, would like to show a really early
sketch of this gadget.  See the tools/abidb python script in the
users/fche/abidb branch.  I am better educated about limitations of
abicompat as discussed downthread, but this script doesn't attempt to
solve the whole problem yet.  Recursive searches for SOLIB chains,
reverse dependencies for weak symbols etc., are not in there, but
some of them could be added.  Anyway, what there is now:


% abidb --help
usage: abidb [-h] [--loglevel LOGLEVEL] [--git GIT]
             [--distrobranch DISTROBRANCH] [--submit [SUBMIT ...]]
             [--check [CHECK ...]] [--ld-library-path LD_LIBRARY_PATH]

Check binary against abidb corpus and/or submit new data.

options:
  -h, --help            show this help message and exit
  --loglevel LOGLEVEL   logging level (default: info)
  --git GIT             abidb git working tree (default: .)
  --distrobranch DISTROBRANCH
                        use given abidb distrobranch (default:
                        fedora/39/x86_64)
  --submit [SUBMIT ...]
                        submit abidw of given binaries to abidb (default: [])
  --check [CHECK ...]   check given binaries against abidb (default: [])
  --ld-library-path LD_LIBRARY_PATH
                        LD_LIBRARY_PATH to use for soname resolution during
                        check (default: /lib:/lib64)


% git init /tmp/abidb

NB: this git repo would naturally be centrally shareable over time.


% abidb --git /tmp/abidb --submit /lib*/libc.so.?
2023-12-05 19:07:58,738:abidb:INFO:checked out distrobranch fedora/39/x86_64 files 0
2023-12-05 19:07:59,268:abidb:INFO:binary /lib64/libc.so.6 abidb-path /tmp/abidb/lib64/libc.so.6/7dd93cb9991a89f0ec53d9443a0b78ad952269bc.xml abixml-length 3305422 commit e90283c5fe45a2c465edfeb2ec55f3b47cf6dce3
2023-12-05 19:08:00,226:abidb:INFO:binary /lib/libc.so.6 abidb-path /tmp/abidb/lib/libc.so.6/02ac2b73b0b28086109ca73389bf97a26fd70542.xml abixml-length 3521035 commit 57536c5b38e9463654432c0b31e4ff5401eed512

NB: the directory structure in git mirrors the filesystem, plus the
appropriate BUILDID.  This allows multiple different updates of the
same library to be represented.

% abidb  --git /tmp/abidb --check /bin/ls         
2023-12-05 19:08:35,699:abidb:INFO:checked out distrobranch fedora/39/x86_64 files 2
2023-12-05 19:08:35,701:abidb:WARNING:no abi.xml found for libselinux.so.1 searching under /lib:/lib64
2023-12-05 19:08:35,701:abidb:WARNING:no abi.xml found for libcap.so.2 searching under /lib:/lib64
2023-12-05 19:08:35,867:abidb:INFO:abicompat success: /bin/ls vs. /tmp/abidb/lib/libc.so.6/02ac2b73b0b28086109ca73389bf97a26fd70542.xml
2023-12-05 19:08:36,022:abidb:INFO:abicompat success: /bin/ls vs. /tmp/abidb/lib64/libc.so.6/7dd93cb9991a89f0ec53d9443a0b78ad952269bc.xml

NB: it complains not having a few solibs in the database yet, so let's add them:


% abidb  --git /tmp/abidb --submit /lib*/libselinux.so.? /lib*/libcap.so.?
2023-12-05 19:09:10,984:abidb:INFO:checked out distrobranch fedora/39/x86_64 files 2
2023-12-05 19:09:11,041:abidb:INFO:binary /lib64/libselinux.so.1 abidb-path /tmp/abidb/lib64/libselinux.so.1/c3ca2b00f1505a173d44417dc98dced2ec390268.xml abixml-length 281444 commit 91e92229bf17b00cb708d5f0da3e9d94708665a2
2023-12-05 19:09:11,087:abidb:INFO:binary /lib/libselinux.so.1 abidb-path /tmp/abidb/lib/libselinux.so.1/b4ea9035186f94416600ccf6b378afb408a8ec8e.xml abixml-length 280693 commit 9979a994ef5d77ab25ce777ab22ff10aae3d4f59
2023-12-05 19:09:11,119:abidb:INFO:binary /lib64/libcap.so.2 abidb-path /tmp/abidb/lib64/libcap.so.2/ff26c67e54bb86d066f1c3cee3cef74fe0c13a77.xml abixml-length 68942 commit 780a099d2a59132aca0f82ab6d5e553be08c2969
2023-12-05 19:09:11,144:abidb:INFO:binary /lib/libcap.so.2 abidb-path /tmp/abidb/lib/libcap.so.2/86ab6783bd93f43139db2924cbbf25bc9419dc9c.xml abixml-length 69053 commit 7f9cec82580c58007748f470408030195d9dcd07

NB: now it will be happy

% abidb  --git /tmp/abidb --check /bin/ls                                 
2023-12-05 19:09:27,561:abidb:INFO:checked out distrobranch fedora/39/x86_64 files 6
2023-12-05 19:09:27,578:abidb:INFO:abicompat success: /bin/ls vs. /tmp/abidb/lib/libselinux.so.1/b4ea9035186f94416600ccf6b378afb408a8ec8e.xml
2023-12-05 19:09:27,590:abidb:INFO:abicompat success: /bin/ls vs. /tmp/abidb/lib64/libselinux.so.1/c3ca2b00f1505a173d44417dc98dced2ec390268.xml
2023-12-05 19:09:27,596:abidb:INFO:abicompat success: /bin/ls vs. /tmp/abidb/lib/libcap.so.2/86ab6783bd93f43139db2924cbbf25bc9419dc9c.xml
2023-12-05 19:09:27,602:abidb:INFO:abicompat success: /bin/ls vs. /tmp/abidb/lib64/libcap.so.2/ff26c67e54bb86d066f1c3cee3cef74fe0c13a77.xml
2023-12-05 19:09:27,768:abidb:INFO:abicompat success: /bin/ls vs. /tmp/abidb/lib/libc.so.6/02ac2b73b0b28086109ca73389bf97a26fd70542.xml
2023-12-05 19:09:27,920:abidb:INFO:abicompat success: /bin/ls vs. /tmp/abidb/lib64/libc.so.6/7dd93cb9991a89f0ec53d9443a0b78ad952269bc.xml

NB: ok let's try some random ancient binary

% abidb  --git /tmp/abidb --check /usr/local/bin/avplay

2023-12-05 19:11:17,151:abidb:INFO:checked out distrobranch fedora/39/x86_64 files 6
2023-12-05 19:11:17,153:abidb:WARNING:no abi.xml found for libm.so.6 searching under /lib:/lib64
2023-12-05 19:11:17,153:abidb:WARNING:no abi.xml found for libasound.so.2 searching under /lib:/lib64
2023-12-05 19:11:17,153:abidb:WARNING:no abi.xml found for libbz2.so.1 searching under /lib:/lib64
2023-12-05 19:11:17,153:abidb:WARNING:no abi.xml found for libz.so.1 searching under /lib:/lib64
2023-12-05 19:11:17,153:abidb:WARNING:no abi.xml found for libSDL-1.2.so.0 searching under /lib:/lib64
2023-12-05 19:11:17,153:abidb:WARNING:no abi.xml found for libpthread.so.0 searching under /lib:/lib64
2023-12-05 19:11:22,889:abidb:WARNING:abicompat error: /usr/local/bin/avplay vs. /tmp/abidb/lib/libc.so.6/02ac2b73b0b28086109ca73389bf97a26fd70542.xml:
functions defined in library '/tmp/abidb/lib/libc.so.6/02ac2b73b0b28086109ca73389bf97a26fd70542.xml'
have sub-types that are different from what application '/usr/local/bin/avplay' expects:

  function int __xpg_strerror_r(int, char*, size_t):
    parameter 3 of type 'typedef size_t' changed:
      underlying type 'unsigned long int' changed:
        type name changed from 'unsigned long int' to 'unsigned int'
        type size changed from 64 to 32 (in bits)
    address size of function changed from 64 bits to 32 bits

variables defined in library '/tmp/abidb/lib/libc.so.6/02ac2b73b0b28086109ca73389bf97a26fd70542.xml'
have sub-types that are different from what application '/usr/local/bin/avplay' expects:

  void (void*, void*)* __free_hook:
    in pointed to type 'function type void (void*, void*)':
      address size of function changed from 64 bits to 32 bits

  FILE* stdin:
    in pointed to type 'typedef FILE' at FILE.h:7:1:
      underlying type 'struct _IO_FILE' at struct_FILE.h:49:1 changed:
        type size changed from 1728 to 1184 (in bits)
[...]
  long int __timezone:
    type size changed from 64 to 32 (in bits)



2023-12-05 19:11:22,889:abidb:INFO:abicompat success: /usr/local/bin/avplay vs. /tmp/abidb/lib/libc.so.6/02ac2b73b0b28086109ca73389bf97a26fd70542.xml
2023-12-05 19:11:28,727:abidb:WARNING:abicompat error: /usr/local/bin/avplay vs. /tmp/abidb/lib64/libc.so.6/7dd93cb9991a89f0ec53d9443a0b78ad952269bc.xml:
functions defined in library '/tmp/abidb/lib64/libc.so.6/7dd93cb9991a89f0ec53d9443a0b78ad952269bc.xml'
have sub-types that are different from what application '/usr/local/bin/avplay' expects:

  function int fputc(int, FILE*):
    parameter 2 of type 'FILE*' has sub-type changes:
      in pointed to type 'typedef FILE' at FILE.h:7:1:
        underlying type 'struct _IO_FILE' at struct_FILE.h:49:1 changed:
          type size hasn't changed
[...]
        unqualified underlying type 'struct tm' changed at struct_tm.h:7:1, as reported earlier

variables defined in library '/tmp/abidb/lib64/libc.so.6/7dd93cb9991a89f0ec53d9443a0b78ad952269bc.xml'
have sub-types that are different from what application '/usr/local/bin/avplay' expects:

  FILE* stdin:
    pointed to type 'typedef FILE' changed at FILE.h:7:1, as reported earlier
[...]

2023-12-05 19:11:28,727:abidb:INFO:abicompat success: /usr/local/bin/avplay vs. /tmp/abidb/lib64/libc.so.6/7dd93cb9991a89f0ec53d9443a0b78ad952269bc.xml


That's it for now.


- FChE


  reply	other threads:[~2023-12-06  0:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-15 15:53 Frank Ch. Eigler
2023-11-17 12:59 ` Dodji Seketeli
2023-11-17 14:53   ` Frank Ch. Eigler
2023-11-17 23:06     ` Dodji Seketeli
2023-12-06  0:14       ` Frank Ch. Eigler [this message]
2023-11-27 19:17   ` Ben Woodard
2023-11-28 13:52     ` Dodji Seketeli
2023-11-21 14:54 ` Giuliano Procida
2023-11-27 19:09 ` Ben Woodard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231206001440.GA12666@redhat.com \
    --to=fche@redhat.com \
    --cc=dodji@seketeli.org \
    --cc=libabigail@sourceware.org \
    --cc=woodard@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).