Bug 18894 - abidiff: Many libraries have problems with abi symmetry due to enumerations
Summary: abidiff: Many libraries have problems with abi symmetry due to enumerations
Status: RESOLVED FIXED
Alias: None
Product: libabigail
Classification: Unclassified
Component: default (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Dodji Seketeli
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-29 00:46 UTC by Ben Woodard
Modified: 2015-08-31 08:54 UTC (History)
2 users (show)

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


Attachments
a library that demonstrates this problem (348.92 KB, application/x-sharedlib)
2015-08-29 00:46 UTC, Ben Woodard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Woodard 2015-08-29 00:46:34 UTC
Created attachment 8563 [details]
a library that demonstrates this problem

Many libraries report problems with ABI symmetry. Here are some examples.

hype356@ben:less libdbus-1.so.abi.diff 
Functions changes summary: 0 Removed, 1 Changed (154 filtered out), 0 Added function
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

1 function with some indirect sub-type change:

  [C]'function void dbus_bus_add_match(DBusConnection*, const char*, DBusError*)' has some indirect sub-type changes:
    parameter 1 of type 'DBusConnection*' has sub-type changes:
      in pointed to type 'typedef DBusConnection':
        underlying type 'struct DBusConnection' changed:
          1 data member changes (17 filtered):
           type of 'DBusTransport* DBusConnection::transport' changed:
             in pointed to type 'typedef DBusTransport':
               underlying type 'struct DBusTransport' changed:
                 1 data member changes (4 filtered):
                  type of 'DBusMessageLoader* DBusTransport::loader' changed:
                    in pointed to type 'typedef DBusMessageLoader':
                      underlying type 'struct DBusMessageLoader' changed:
                        1 data member changes (1 filtered):
                         type of 'DBusValidity DBusMessageLoader::corruption_reason' changed:
                           underlying type 'enum __anonymous_enum__' changed:
                             3 enumerator changes:
                               '__anonymous_enum__::DBUS_VALIDITY_UNKNOWN_OOM_ERROR' from value '18446744073709551612' to '18446744073709551615'
                               '__anonymous_enum__::DBUS_INVALID_FOR_UNKNOWN_REASON' from value '18446744073709551613' to '18446744073709551615'
                               '__anonymous_enum__::DBUS_VALID_BUT_INCOMPLETE' from value '18446744073709551614' to '18446744073709551615'

hype356@ben:cat libfreetype.so.abi.diff 
Functions changes summary: 0 Removed, 1 Changed (1 filtered out), 0 Added function
Variables changes summary: 0 Removed, 1 Changed, 0 Added variable

1 function with some indirect sub-type change:

  [C]'function FT_Error af_get_char_index(AF_StyleMetrics, FT_ULong, FT_ULong*, FT_Long*)' has some indirect sub-type changes:
    parameter 1 of type 'typedef AF_StyleMetrics' has sub-type changes:
      underlying type 'AF_StyleMetricsRec_*' changed:
        in pointed to type 'struct AF_StyleMetricsRec_':
          1 data member change:
           type of 'AF_FaceGlobals AF_StyleMetricsRec_::globals' changed:
             underlying type 'AF_FaceGlobalsRec_*' changed:
               in pointed to type 'struct AF_FaceGlobalsRec_':
                 1 data member changes (1 filtered):
                  type of 'AF_Module AF_FaceGlobalsRec_::module' changed:
                    underlying type 'AF_ModuleRec_*' changed:
                      in pointed to type 'struct AF_ModuleRec_':
                        1 data member change:
                         type of 'AF_LoaderRec AF_ModuleRec_::loader[1]' changed:
                           array element type 'typedef AF_LoaderRec' changed: 
                             underlying type 'struct AF_LoaderRec_' changed:
                               1 data member changes (2 filtered):
                                type of 'AF_GlyphHintsRec AF_LoaderRec_::hints' changed:
                                  underlying type 'struct AF_GlyphHintsRec_' changed:
                                    1 data member changes (1 filtered):
                                     type of 'AF_AxisHintsRec AF_GlyphHintsRec_::axis[2]' changed:
                                       array element type 'typedef AF_AxisHintsRec' changed: 
                                         underlying type 'struct AF_AxisHintsRec_' changed:
                                           1 data member change:
                                            type of 'AF_Direction AF_AxisHintsRec_::major_dir' changed:
                                              underlying type 'enum AF_Direction_' changed:
                                                1 enumerator change:
                                                  'AF_Direction_::AF_DIR_DOWN' from value '18446744073709551614' to '18446744073709551615'

1 Changed variable:

  [C]'const ft_raccess_guess_rec[9] ft_raccess_guess_table' was changed:
    type of variable changed:
     in unqualified underlying type 'ft_raccess_guess_rec[9]':
       array element type 'typedef ft_raccess_guess_rec' changed: 
         underlying type 'struct ft_raccess_guess_rec_' changed:
           1 data member change:
            type of 'FT_RFork_Rule ft_raccess_guess_rec_::type' changed:
              underlying type 'enum FT_RFork_Rule_' changed:
                1 enumerator change:
                  'FT_RFork_Rule_::FT_RFork_Rule_invalid' from value '18446744073709551614' to '18446744073709551615'

These big numbers suggest to me that maybe the underlying problem is an uninitialized variable.

How to reproduce: 
hype356@ben:~/bin/abidiff /collab/usr/global/tools/order/spack/opt/chaos_5_x86_64_ib/gcc@4.4.7/dbus@1.9.0/lib/libdbus-1.so libdbus-1.so
Functions changes summary: 0 Removed, 1 Changed (154 filtered out), 0 Added function
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

1 function with some indirect sub-type change:

  [C]'function void dbus_bus_add_match(DBusConnection*, const char*, DBusError*)' has some indirect sub-type changes:
...
Comment 1 Dodji Seketeli 2015-08-31 08:54:19 UTC
This issue should now be fixed in the master branch by commit https://sourceware.org/git/gitweb.cgi?p=libabigail.git;a=commit;h=5822798dd1e2163d55cac9b9b72f0eacb21fb718

Thank you for filling this problem report!