From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0D8CC393C01D; Tue, 19 Jan 2021 21:54:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0D8CC393C01D From: "woodard at redhat dot com" To: libabigail@sourceware.org Subject: [Bug default/27208] New: abicompat doesn't check back calls. Date: Tue, 19 Jan 2021 21:54:31 +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: woodard 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 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, 19 Jan 2021 21:54:32 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27208 Bug ID: 27208 Summary: abicompat doesn't check back calls. Product: libabigail Version: unspecified Status: NEW Severity: normal Priority: P2 Component: default Assignee: dodji at redhat dot com Reporter: woodard at redhat dot com CC: libabigail at sourceware dot org Target Milestone: --- Created attachment 13135 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D13135&action=3Ded= it reproducer code. abicompat doesn't check calls from a library into functions provided by an application. It only checks that calls from the app into a library provide = the same ABI. This is not sufficient to assert abi compatibility. Say for example you have: #include char *backcall( char *arg){ return arg+1; } char *libcall( char *arg); int main(int argc, char **argv){ printf("%s\n", libcall(argv[0])); return 0; } and in a library you have: // this would normally be in a header provided by the app // it is just here to make the reproducer simple. char *backcall( char *arg);=20 char *libcall( char *arg){ return backcall(arg); } However an older or a newer version of the app provided a different interfa= ce and so the library is: // notice this is different int backcall( char *arg); char *libcall( char *arg){ return arg+backcall(arg); } So abicompat should point out that the second version of the library is not compatible with the app but it doesn't. $ abicompat app1 libt1.so libt2.so=20 $ echo $? 0 The problem is that abicompat doesn't perform 2 way comparison with the library. it doesn't mark the call from the library to the application as ne= eded then compare that to what the application provides. This programming style is not uncommon. It happens anytime there is a defin= ed plugin interface --=20 You are receiving this mail because: You are on the CC list for the bug.=