From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1A8093840C3D; Tue, 28 Jul 2020 16:05:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1A8093840C3D From: "gprocida+abigail at google dot com" To: libabigail@sourceware.org Subject: [Bug default/26309] New: abidiff --leaf-changes-only asserts on typedef change Date: Tue, 28 Jul 2020 16:05:25 +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: gprocida+abigail at google dot com X-Bugzilla-Status: UNCONFIRMED 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 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 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: Tue, 28 Jul 2020 16:05:26 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26309 Bug ID: 26309 Summary: abidiff --leaf-changes-only asserts on typedef change Product: libabigail Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: default Assignee: dodji at redhat dot com Reporter: gprocida+abigail at google dot com CC: libabigail at sourceware dot org Target Milestone: --- If we only cared purely about ABIs, we'd just resolve typedefs to their resulting types and then diff. However, libabigail clearly does care about typedefs and things like name changes. It doesn't get things right for the = case below. There are perhaps two issues here. Firstly, abidiff thinks there is nothing to report. Secondly, even if you convince abidiff to report something, it's missing information about the aliased type in leaf mode. >From a different perspective, if we view the typedef as a fully-fledged typ= e, then changes to it will certainly affect the API (as well as the ABI) and perhaps it should be listed as a type change with the function change as an impacted interface. test-leaf-typedef-v0.c: typedef int changed; void changed_fun(changed y) { (void) y; } test-leaf-typedef-v1.c: typedef long changed; void changed_fun(changed y) { (void) y; } Compiled with GCC 9.3. for x in test-leaf-typedef-v?.c; do gcc -Wall -Wextra -g -c $x; done $ .../abidiff --leaf-changes-only test-leaf-typedef-v?.o Leaf changes summary: 1 artifact changed Changed leaf types summary: 0 leaf type changed Removed/Changed/Added functions summary: 0 Removed, 1 Changed, 0 Added func= tion Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added vari= able 1 function with some sub-type change: [C] 'function void changed_fun(changed)' at test-leaf-typedef-v1.c:3:1 has some sub-type changes: abidiff: ../../src/abg-leaf-reporter.cc:276: virtual void abigail::comparison::leaf_reporter::report(const abigail::comparison::fn_parm_diff&, std::ostream&, const string&) const: Assertion `__abg_cond__' failed. Aborted --=20 You are receiving this mail because: You are on the CC list for the bug.=