public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [Bug default/27208] New: abicompat doesn't check back calls.
@ 2021-01-19 21:54 woodard at redhat dot com
  2021-01-19 21:56 ` [Bug default/27208] " woodard at redhat dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: woodard at redhat dot com @ 2021-01-19 21:54 UTC (permalink / raw)
  To: libabigail

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

            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=13135&action=edit
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 <stdio.h>

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); 

char *libcall( char *arg){
  return backcall(arg);
}

However an older or a newer version of the app provided a different interface
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 
$ 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 needed
then compare that to what the application provides.

This programming style is not uncommon. It happens anytime there is a defined
plugin interface

-- 
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:[~2022-03-31 10:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-19 21:54 [Bug default/27208] New: abicompat doesn't check back calls woodard at redhat dot com
2021-01-19 21:56 ` [Bug default/27208] " woodard at redhat dot com
2021-01-19 22:12 ` woodard at redhat dot com
2021-03-04 18:12 ` woodard at redhat dot com
2021-05-17 18:14 ` woodard at redhat dot com
2021-05-17 18:45 ` [Bug default/27208] Eabicompat doesn't consider functions (or variables) whose symbol type is NOTYPE woodard at redhat dot com
2021-06-08  0:21 ` [Bug default/27208] abicompat " woodard at redhat dot com
2022-03-29 20:41 ` [Bug default/27208] abicompat doesn't consider references from the libraries to the main executable woodard at redhat dot com
2022-03-31  9:06 ` woodard at redhat dot com
2022-03-31 10:08 ` woodard at redhat dot com
2022-03-31 10:21 ` woodard at redhat dot com

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).