Bug 27278 - Stray non-diff
Summary: Stray non-diff
Status: UNCONFIRMED
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: 2021-01-29 16:45 UTC by Giuliano Procida
Modified: 2021-07-26 15:57 UTC (History)
2 users (show)

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


Attachments
input XML files (2.05 MB, application/gzip)
2021-01-29 16:45 UTC, Giuliano Procida
Details
two test cases (2.78 MB, application/x-bzip2)
2021-02-01 14:22 UTC, Giuliano Procida
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Giuliano Procida 2021-01-29 16:45:06 UTC
Created attachment 13175 [details]
input XML files

Hi.

Here is an instance where abidiff thinks there is a change, but doesn't have anything to say. There may be something not quite right in how things are labelled as harmless. Interestingly, the output looks more correct with --leaf-changes-only.

I'm afraid I don't have a small test case. This is at current master, 40709acdd5189e473f27cd8626d6023d6bdf6d8d.

$ abidiff --leaf-changes-only /tmp/{a,b}.xml
Leaf changes summary: 0 artifact changed (80 filtered out)
Changed leaf types summary: 0 (80 filtered out) leaf types 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

$ build/tools/abidiff /tmp/{a,b}.xml
Functions changes summary: 0 Removed, 2 Changed (3373 filtered out), 0 Added functions                                                          
Variables changes summary: 0 Removed, 0 Changed (78 filtered out), 0 Added variables

2 functions with some indirect sub-type change:

  [C] 'function bool drm_dp_mst_allocate_vcpi(drm_dp_mst_topology_mgr*, drm_dp_mst_port*, int, int)' at drm_dp_mst_topology.c:0:0 has some indirect sub-type changes:
    parameter 2 of type 'drm_dp_mst_port*' has sub-type changes:
      in pointed to type 'struct drm_dp_mst_port' at drm_dp_mst_helper.h:0:0:
        type size hasn't changed
        no data member changes (5 filtered);

  [C] 'function void drm_dp_mst_deallocate_vcpi(drm_dp_mst_topology_mgr*, drm_dp_mst_port*)' at drm_dp_mst_topology.c:0:0 has some indirect sub-type changes:
    parameter 2 of type 'drm_dp_mst_port*' has sub-type changes:
      pointed to type 'struct drm_dp_mst_port' changed at drm_dp_mst_helper.h:0:0, as reported earlier
Comment 1 Giuliano Procida 2021-02-01 14:22:00 UTC
Created attachment 13190 [details]
two test cases

Here's another case we ran into on the same AOSP branch. We don't often run without --leaf-changes-only, so this seems to be happening reasonably often. Reproduced at master.

The archive now also contains c.xml and d.xml. Comparing them with plain abidiff results in:

Functions changes summary: 0 Removed, 2 Changed (1600 filtered out), 0 Added functions
Variables changes summary: 0 Removed, 0 Changed (19 filtered out), 0 Added variables

2 functions with some indirect sub-type change:

  [C] 'function int inet_sk_diag_fill(sock*, inet_connection_sock*, sk_buff*, const inet_diag_req_v2*, user_namespace*, unsigned int, unsigned int, unsigned short int, const nlmsghdr*, bool)' at inet_diag.h:39:1 has some indirect sub-type changes:
    parameter 2 of type 'inet_connection_sock*' has sub-type changes:
      in pointed to type 'struct inet_connection_sock' at inet_connection_sock.h:89:1:
        type size hasn't changed
        1 data member insertion:
          'u32 inet_connection_sock::icsk_probes_tstamp', at offset 11008 (in bits) at inet_connection_sock.h:151:1
        1 data member changes (7 filtered):
          type of 'struct {int enabled; int search_high; int search_low; int probe_size; u32 probe_timestamp;} inet_connection_sock::icsk_mtup' changed:
            type size changed from 160 to 128 (in bits)
            5 data member changes:
              'int enabled' offset changed from 0 to 31 (in bits) (by +31 bits)
              'int search_high' offset changed from 32 to 0 (in bits) (by -32 bits)
              'int search_low' offset changed from 64 to 32 (in bits) (by -32 bits)
              'int probe_size' offset changed from 96 to 64 (in bits) (by -32 bits)
              'u32 probe_timestamp' offset changed from 128 to 96 (in bits) (by -32 bits)

  [C] 'function unsigned int tcp_slow_start(tcp_sock*, unsigned int)' at tcp.h:1090:1 has some indirect sub-type changes:
    parameter 1 of type 'tcp_sock*' has sub-type changes:
      in pointed to type 'struct tcp_sock' at tcp.h:138:1:
        type size hasn't changed
        1 data member changes (1 filtered):
          'inet_connection_sock tcp_sock::inet_conn' has *some* difference - please report as a bug
Comment 2 Giuliano Procida 2021-04-13 09:52:05 UTC
Both cases still reproduced at current master, a16b922b11665d5405421a50d98f475cbbcbb300.
Comment 3 Giuliano Procida 2021-05-11 10:13:05 UTC
Both cases still reproduced at current master commit 1656f9dd7b09cfc5013b891b93fa6b4dc41a0b6b.
Comment 4 gprocida 2021-07-26 15:57:51 UTC
I've rechecked the a.xml b.xml case with latest upstream master (cfd81dec10b26759b08c60c59b0d32f905d9913f).

I get similarly bad output with plain abidiff and similarly good output with abidiff --leaf-changes-only.

Note

We are now post-processing all abidw-generated XML for more recent Android kernels with a utility that tidies the XML in various ways, mostly so that XML diffs are more predictable.

The tidied XML has no harmful diffs with or without --leaf-changes-only. I'm not sure which of the various passes contributed to this, but I can dig further if that's of interest.

We will likely no longer spot or report issues that go away after XML tidying.