[Bug,default/33076] New: abicompat does not categorize and filter out harmless diff nodes
| Message ID | bug-33076-9487@http.sourceware.org/bugzilla/ |
|---|---|
| State | New |
| Headers |
Return-Path: <libabigail-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 704D2385B513 for <patchwork@sourceware.org>; Wed, 11 Jun 2025 16:09:23 +0000 (GMT) X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: by sourceware.org (Postfix, from userid 48) id 8F97E385841E; Wed, 11 Jun 2025 16:05:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8F97E385841E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1749657974; bh=+TTqXdwKzMM9vRCfSzMWqK3Zg9d+2EKd9rWXsl2ye6I=; h=From:To:Subject:Date:From; b=U28ET6ftY8+LaIbBBy6oOWes68b+jjpWHdm/J+v7RikiWwUHn6NL5T7QGCL3CmJ0W e6KkCX+jIpW/b6UM8tn2tkvvG+dk/RYYrbaAz/0XU/v9ekwYOt0fpJFco6Es+ZDSPE Ps3EUsy6dvnae/Xg1QAmQQmGWHtUn4hlvX/LPocg= From: "dodji at seketeli dot org" <sourceware-bugzilla@sourceware.org> To: libabigail@sourceware.org Subject: [Bug default/33076] New: abicompat does not categorize and filter out harmless diff nodes Date: Wed, 11 Jun 2025 16:05:18 +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 seketeli dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org 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 Message-ID: <bug-33076-9487@http.sourceware.org/bugzilla/> 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.30 Precedence: list List-Id: Mailing list of the Libabigail project <libabigail.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libabigail>, <mailto:libabigail-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libabigail/> List-Post: <mailto:libabigail@sourceware.org> List-Help: <mailto:libabigail-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libabigail>, <mailto:libabigail-request@sourceware.org?subject=subscribe> Errors-To: libabigail-bounces~patchwork=sourceware.org@sourceware.org |
| Series |
[Bug,default/33076] New: abicompat does not categorize and filter out harmless diff nodes
|
|
Commit Message
mark at klomp dot org
June 11, 2025, 4:05 p.m. UTC
https://sourceware.org/bugzilla/show_bug.cgi?id=33076
Bug ID: 33076
Summary: abicompat does not categorize and filter out harmless
diff nodes
Product: libabigail
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: default
Assignee: unassigned at sourceware dot org
Reporter: dodji at seketeli dot org
CC: libabigail at sourceware dot org
Target Milestone: ---
Consider this application and shared libraries compared:
$ cat 0/test-diff-ptr-to-void-ptr-fn-v0.c
typedef void* VOID_PTR;
void
foo(int a __attribute__((unused)),
char b __attribute__((unused)),
VOID_PTR c __attribute__((unused)))
{
}
$ gcc -g -Wall -shared -fPIC -o 0/libtest-diff-ptr-to-void-ptr-fn.so
0/test-diff-ptr-to-void-ptr-fn-v0.c
$ cat 1/test-diff-ptr-to-void-ptr-fn-v1.c
typedef void (*PTR_TO_FN)(...);
void
foo(int a __attribute__((unused)),
char b __attribute__((unused)),
PTR_TO_FN c __attribute__((unused)))
{
}
$ diff -u 0/test-diff-ptr-to-void-ptr-fn-v0.c
1/test-diff-ptr-to-void-ptr-fn-v1.c
$ gcc -g -Wall -shared -fPIC -o 1/libtest-diff-ptr-to-void-ptr-fn.so
1/test-diff-ptr-to-void-ptr-fn-v1.c
$ cat test-diff-ptr-to-void-ptr-app.c
#include <stddef.h>
typedef void* VOID_PTR;
void
foo(int a __attribute__((unused)),
char b __attribute__((unused)),
VOID_PTR c __attribute__((unused)));
int
main()
{
foo(0, 0, NULL);
return 0;
}
$ gcc -g -Wall -L0/ -ltest-diff-ptr-to-void-ptr-fn
test-diff-ptr-to-void-ptr-app.c -o test-diff-ptr-to-void-ptr-app
$ abicompat test-diff-ptr-to-void-ptr-app 0/libtest-diff-ptr-to-void-ptr-fn.so
$ abicompat test-diff-ptr-to-void-ptr-app 1/libtest-diff-ptr-to-void-ptr-fn.so
functions defined in library '1/libtest-diff-ptr-to-void-ptr-fn.so'
have sub-types that are different from what application
'test-diff-ptr-to-void-ptr-app' expects:
function void foo(int, char, VOID_PTR):
parameter 3 of type 'typedef VOID_PTR' changed:
typedef name changed from VOID_PTR to PTR_TO_FN at
test-diff-ptr-to-void-ptr-fn-v1.c:1:1
underlying type 'void*' changed:
in pointed to type 'void':
entity changed from 'void' to 'function type void (...)'
type size changed from 0 to 64 (in bits)
$ abidiff 0/libtest-diff-ptr-to-void-ptr-fn.so
1/libtest-diff-ptr-to-void-ptr-fn.so
Functions changes summary: 0 Removed, 0 Changed (1 filtered out), 0 Added
function
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
$ abidiff --harmless 0/libtest-diff-ptr-to-void-ptr-fn.so
1/libtest-diff-ptr-to-void-ptr-fn.so
Functions changes summary: 0 Removed, 1 Changed, 0 Added function
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
1 function with some indirect sub-type change:
[C] 'function void foo(int, char, VOID_PTR)' at
test-diff-ptr-to-void-ptr-fn-v0.c:4:1 has some indirect sub-type changes:
parameter 3 of type 'typedef VOID_PTR' changed:
typedef name changed from VOID_PTR to PTR_TO_FN at
test-diff-ptr-to-void-ptr-fn-v1.c:1:1
underlying type 'void*' changed:
in pointed to type 'void':
entity changed from 'void' to 'function type void (...)'
type size changed from 0 to 64 (in bits)
$
Note how 0/libtest-diff-ptr-to-void-ptr-fn.so and
1/libtest-diff-ptr-to-void-ptr-fn.so have a slight harmless ABI change that is
filtered out by default by abidiff, but not by abicompat.
That makes tests/build/runtestabidb1.sh fail on ppc64le running fedora40
because /usr/bin/make expects a libguile.so that has a slight harmless ABI
change with the libguile.so provided.
The exact error is:
https://builder.sourceware.org/testrun/ad48bd119f677c0d2165c0083c3010fe57412634?filename=tests%2Fruntestabidb1.sh.log.
Note that we don't have that error on other versions of Fedora where
/usr/bin/make doesn't depend on libguile.so
Comments
https://sourceware.org/bugzilla/show_bug.cgi?id=33076
Dodji Seketeli <dodji at seketeli dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
https://sourceware.org/bugzilla/show_bug.cgi?id=33076 --- Comment #1 from Dodji Seketeli <dodji at seketeli dot org> --- A fix for this is being worked on in the branch https://sourceware.org/cgit/libabigail/log/?h=users/dodji/abicompat-filter-diff-node
https://sourceware.org/bugzilla/show_bug.cgi?id=33076
Dodji Seketeli <dodji at seketeli dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Dodji Seketeli <dodji at seketeli dot org> ---
This bug should be fixed by commit
https://sourceware.org/cgit/libabigail/commit/?id=e3f967cd93d39ed3ff2fcbef2c07c42350d5a11f.
The fix should be available in libabigail 2.8.
--- 0/test-diff-ptr-to-void-ptr-fn-v0.c 2025-06-11 14:58:03.660096563 +0200 +++ 1/test-diff-ptr-to-void-ptr-fn-v1.c 2025-06-11 14:59:23.292433838 +0200 @@ -1,8 +1,8 @@ -typedef void* VOID_PTR; +typedef void (*PTR_TO_FN)(...); void foo(int a __attribute__((unused)), char b __attribute__((unused)), - VOID_PTR c __attribute__((unused))) + PTR_TO_FN c __attribute__((unused))) { }