Bug 26993

Summary: something is being lost in the abi
Product: libabigail Reporter: Ben Woodard <woodard>
Component: defaultAssignee: Dodji Seketeli <dodji>
Status: RESOLVED FIXED    
Severity: normal CC: libabigail, maennich
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 27019    

Description Ben Woodard 2020-12-01 15:22:53 UTC
When running abidw --abidiff /lib64/libmutter-7.so.0.0.0
from mutter-3.38.1-3.fc33.x86_64

There are a ton of changes being reported

18 functions with some indirect sub-type change:

  [C] 'function void meta_wayland_client_hide_from_window_list(MetaWaylandClient*, MetaWindow*)' at meta-wayland-client.c:303:1 has some indirect sub-type changes:
    parameter 2 of type 'MetaWindow*' has sub-type changes:
      in pointed to type 'typedef MetaWindow' at types.h:32:1:
        underlying type 'struct _MetaWindow' at window-private.h:160:1 changed:
          type size hasn't changed
          4 data member changes:
            type of 'MetaDisplay* _MetaWindow::display' changed:
              in pointed to type 'typedef MetaDisplay' at types.h:29:1:
                underlying type 'struct _MetaDisplay' at display-private.h:107:1 changed:
                  type size hasn't changed
                  4 data member changes:
                    type of 'MetaWindow* _MetaDisplay::focus_window' changed:
                      in pointed to type 'typedef MetaWindow' at types.h:32:1:
                        underlying type 'struct _MetaWindow' changed, as being reported
                    type of 'MetaWindow* _MetaDisplay::autoraise_window' changed:
                      in pointed to type 'typedef MetaWindow' at types.h:32:1:
                        underlying type 'struct _MetaWindow' changed, as being reported
                    type of 'MetaWindow* _MetaDisplay::grab_window' changed:
                      in pointed to type 'typedef MetaWindow' at types.h:32:1:
                        underlying type 'struct _MetaWindow' changed, as being reported
                    type of 'MetaStack* _MetaDisplay::stack' changed:
                      in pointed to type 'typedef MetaStack' at display-private.h:50:1:
                        underlying type 'struct _MetaStack' at stack.h:52:1 changed:
                          type size hasn't changed
                          1 data member change:
                            type of 'MetaDisplay* _MetaStack::display' changed:
                              in pointed to type 'typedef MetaDisplay' at types.h:29:1:
                                underlying type 'struct _MetaDisplay' changed, as being reported
            type of 'MetaWindow* _MetaWindow::transient_for' changed:
              in pointed to type 'typedef MetaWindow' at types.h:32:1:
                underlying type 'struct _MetaWindow' changed, as being reported
            type of 'MetaWindow* _MetaWindow::attached_focus_window' changed:
              in pointed to type 'typedef MetaWindow' at types.h:32:1:
                underlying type 'struct _MetaWindow' changed, as being reported
            type of 'MetaWindow* _MetaWindow::tile_match' changed:
              in pointed to type 'typedef MetaWindow' at types.h:32:1:
                underlying type 'struct _MetaWindow' changed, as being reported
<snip>

but looking through all the output I cannot figure out what the crux of the change that is being reported is. It doesn't seem to be either of the "union" problem or the "declared becoming defined" problem.
Comment 1 Matthias Maennich 2020-12-01 15:24:39 UTC
Can you attempt to run this this with --leaf-changes-only ?

That might make this less verbose.
Comment 2 Ben Woodard 2020-12-02 18:04:37 UTC
(In reply to Matthias Maennich from comment #1)
> Can you attempt to run this this with --leaf-changes-only ?
> 
> That might make this less verbose.

abidw doesn't have a leaf-changes-only option.

but

$ abidiff --leaf-changes-only --harmless libmutter-7.so.0.0.0.abixml  /lib64/libmutter-7.so.0.0.0
Leaf changes summary: 0 artifact changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

while:

$ abidiff --harmless libmutter-7.so.0.0.0.abixml  /lib64/libmutter-7.so.0.0.0 | wc -l
136

When I do go through those 136 line output pasted below, I honestly do not see any clearly defined change. I think that this is a classic bug, there literally is no change because the same file and so somewhere the comparison is going wrong but it is not really clear why.
Comment 3 Dodji Seketeli 2021-01-15 18:04:50 UTC
Hello,

It looks like the fix for #26992 fixes this issue as well.  In any case, the current master branch with the commit hash below doesn't seem to exhibit the issue anymore:

25d0903 Bug 26992 - Try harder to resolve declaration-only classes

Thanks for taking the time to file this issue!