Bug 27514 - recursively compare libraries in abicompat
Summary: recursively compare libraries in abicompat
Status: NEW
Alias: None
Product: libabigail
Classification: Unclassified
Component: default (show other bugs)
Version: unspecified
: P1 critical
Target Milestone: ---
Assignee: Dodji Seketeli
URL:
Keywords:
Depends on:
Blocks: 27019
  Show dependency treegraph
 
Reported: 2021-03-04 18:02 UTC by Ben Woodard
Modified: 2021-06-23 08:29 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Woodard 2021-03-04 18:02:20 UTC
This is similar and kind of related to 27208 but goes a bit deeper.

abicompat currently only compares one library at a time when evaluating library compatibility. For example:

abicompat app libfoo-v1 libfoo-v2 

The app is also likely to have other dependencies which require ABI artifacts out of libfoo that the app itself may not use. 

app requires libfoo.so and libbar.so
   app only uses foo_init()
   libbar uses additional functions out of libfoo.so

Currently abicompat would say that app is compatible with libfoo so long as foo_init() didn't change. However, if libfoo-v2 had changes that impacted libbar.so which is needed by the app then libfoo-v2 is not compatible with the app.

Therefore the comparison currently done by abicompat where it simply looks at the undefined symbols in the app is not sufficient to guarantee that libfoo-v1 and libfoo-v2 are in fact compatible with the application. It must also look at the dependencies needed by app and include any symbols provided by them.

To be able to address this problem while not breaking current behavior a new mode of operation is needed for abicompat one that loads the corpora not just for the app but also for all its dependencies and then does the abi comparison.
Comment 1 Ben Woodard 2021-03-04 18:10:09 UTC
I would argue that this is a very important bug because it points out that all analysis that has been done with abicompat is potentially invalid.

To address this problem I have been working on a branch which does this. It can be found here: https://github.com/woodard/libabigail/tree/newabicompat
Comment 2 Ben Woodard 2021-03-23 13:34:39 UTC
To be able to do the full closure computation without the original ELF binaries the abixml file is required to include the undefined symbols.
Comment 3 mark smith 2021-06-23 05:23:00 UTC Comment hidden (spam)