public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [Bug default/26085] New: Misreporting of change between typedefs as typedef change in leaf mode
@ 2020-06-05 14:31 gprocida+abigail at google dot com
  2020-09-16 16:16 ` [Bug default/26085] " dodji at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: gprocida+abigail at google dot com @ 2020-06-05 14:31 UTC (permalink / raw)
  To: libabigail

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

            Bug ID: 26085
           Summary: Misreporting of change between typedefs as typedef
                    change in leaf mode
           Product: libabigail
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: default
          Assignee: dodji at redhat dot com
          Reporter: gprocida+abigail at google dot com
                CC: libabigail at sourceware dot org
  Target Milestone: ---

FTR, abidiff built at 7da00ff4b7c10e8a99ef3ec88f2236007c441033.

Here's a small test case that produces the bad behaviour. Either function id1
or function id2 suffices. The last two lines of the second report are not
correct. This was noted during kernel ABI monitoring.

*test-diff-typedef-v0.c*

typedef short small;
typedef int large;

struct foo {
  small x;
};

long id1(struct foo q) { return q.x; }
long id2(small q) { return q; }

*test-diff-typedef-v1.c*

typedef short small;
typedef int large;

struct foo {
  large x;
};

long id1(struct foo q) { return q.x; }
long id2(large q) { return q; }

$ for x in 0 1; do gcc -Wall -Wextra -g -c test-diff-typedef-v$x.c; done
$ $ abidiff test-diff-typedef-v{0,1}.o
Functions changes summary: 0 Removed, 2 Changed, 0 Added functions
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

2 functions with some indirect sub-type change:

  [C] 'function long int id1(foo)' at test-diff-typedef-v1.c:8:1 has some
indirect sub-type changes:
    parameter 1 of type 'struct foo' has sub-type changes:
      type size changed from 16 to 32 (in bits)
      1 data member change:
        type of 'small foo::x' changed:
          typedef name changed from small to large at
test-diff-typedef-v1.c:2:1
          underlying type 'short int' changed:
            type name changed from 'short int' to 'int'
            type size changed from 16 to 32 (in bits)

  [C] 'function long int id2(small)' at test-diff-typedef-v1.c:9:1 has some
indirect sub-type changes:
    parameter 1 of type 'typedef small' changed:
      typedef name changed from small to large at test-diff-typedef-v1.c:2:1
      underlying type 'short int' changed:
        type name changed from 'short int' to 'int'
        type size changed from 16 to 32 (in bits)

$ abidiff --leaf-changes-only  test-diff-typedef-v{0,1}.o
Leaf changes summary: 4 artifacts changed
Changed leaf types summary: 2 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 2 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

2 functions with some sub-type change:

  [C] 'function long int id1(foo)' at test-diff-typedef-v1.c:8:1 has some
sub-type changes:
    parameter 1 of type 'struct foo' changed:
      type size changed from 16 to 32 (in bits)
      there are data member changes:
        type 'typedef small' of 'foo::x' changed:
          typedef name changed from small to large at
test-diff-typedef-v1.c:2:1

  [C] 'function long int id2(small)' at test-diff-typedef-v1.c:9:1 has some
sub-type changes:
    parameter 1 of type 'typedef small' changed:
      typedef name changed from small to large at test-diff-typedef-v1.c:2:1

'struct foo at test-diff-typedef-v0.c:4:1' changed:
  details were reported earlier
'typedef small at test-diff-typedef-v0.c:1:1' changed:
  typedef name changed from small to large at test-diff-typedef-v1.c:2:1

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug default/26085] Misreporting of change between typedefs as typedef change in leaf mode
  2020-06-05 14:31 [Bug default/26085] New: Misreporting of change between typedefs as typedef change in leaf mode gprocida+abigail at google dot com
@ 2020-09-16 16:16 ` dodji at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: dodji at redhat dot com @ 2020-09-16 16:16 UTC (permalink / raw)
  To: libabigail

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

dodji at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #1 from dodji at redhat dot com ---
This issue should be fixed by the fix for bug #26309.

Thank you for taking the time to report this issue.

*** This bug has been marked as a duplicate of bug 26309 ***

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-16 16:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-05 14:31 [Bug default/26085] New: Misreporting of change between typedefs as typedef change in leaf mode gprocida+abigail at google dot com
2020-09-16 16:16 ` [Bug default/26085] " dodji 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).