public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [Bug default/26309] New: abidiff --leaf-changes-only asserts on typedef change
@ 2020-07-28 16:05 gprocida+abigail at google dot com
  2020-09-14  8:44 ` [Bug default/26309] Changes to underlying type of typedef mishandled in leaf reporting mode dodji at redhat dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: gprocida+abigail at google dot com @ 2020-07-28 16:05 UTC (permalink / raw)
  To: libabigail

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

            Bug ID: 26309
           Summary: abidiff --leaf-changes-only asserts on typedef change
           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: ---

If we only cared purely about ABIs, we'd just resolve typedefs to their
resulting types and then diff. However, libabigail clearly does care about
typedefs and things like name changes. It doesn't get things right for the case
below.

There are perhaps two issues here.

Firstly, abidiff thinks there is nothing to report.
Secondly, even if you convince abidiff to report something, it's missing
information about the aliased type in leaf mode.

From a different perspective, if we view the typedef as a fully-fledged type,
then changes to it will certainly affect the API (as well as the ABI) and
perhaps it should be listed as a type change with the function change as an
impacted interface.

test-leaf-typedef-v0.c:
typedef int changed;

void changed_fun(changed y) {
  (void) y;
}

test-leaf-typedef-v1.c:
typedef long changed;

void changed_fun(changed y) {
  (void) y;
}

Compiled with GCC 9.3.
for x in test-leaf-typedef-v?.c; do gcc -Wall -Wextra -g -c $x; done

$ .../abidiff --leaf-changes-only test-leaf-typedef-v?.o
Leaf changes summary: 1 artifact changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 1 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

1 function with some sub-type change:

  [C] 'function void changed_fun(changed)' at test-leaf-typedef-v1.c:3:1 has
some sub-type changes:
abidiff: ../../src/abg-leaf-reporter.cc:276: virtual void
abigail::comparison::leaf_reporter::report(const
abigail::comparison::fn_parm_diff&, std::ostream&, const string&) const:
Assertion `__abg_cond__' failed.
Aborted

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

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

* [Bug default/26309] Changes to underlying type of typedef mishandled in leaf reporting mode
  2020-07-28 16:05 [Bug default/26309] New: abidiff --leaf-changes-only asserts on typedef change gprocida+abigail at google dot com
@ 2020-09-14  8:44 ` dodji at redhat dot com
  2020-09-14 10:46 ` dodji at redhat dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: dodji at redhat dot com @ 2020-09-14  8:44 UTC (permalink / raw)
  To: libabigail

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

dodji at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|abidiff --leaf-changes-only |Changes to underlying type
                   |asserts on typedef change   |of typedef mishandled in
                   |                            |leaf reporting mode
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2020-09-14
     Ever confirmed|0                           |1

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

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

* [Bug default/26309] Changes to underlying type of typedef mishandled in leaf reporting mode
  2020-07-28 16:05 [Bug default/26309] New: abidiff --leaf-changes-only asserts on typedef change gprocida+abigail at google dot com
  2020-09-14  8:44 ` [Bug default/26309] Changes to underlying type of typedef mishandled in leaf reporting mode dodji at redhat dot com
@ 2020-09-14 10:46 ` dodji at redhat dot com
  2020-09-15  7:35 ` dodji at redhat dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: dodji at redhat dot com @ 2020-09-14 10:46 UTC (permalink / raw)
  To: libabigail

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

--- Comment #1 from dodji at redhat dot com ---
A patch for this has been posted for review at
https://sourceware.org/pipermail/libabigail/2020q3/002656.html.

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

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

* [Bug default/26309] Changes to underlying type of typedef mishandled in leaf reporting mode
  2020-07-28 16:05 [Bug default/26309] New: abidiff --leaf-changes-only asserts on typedef change gprocida+abigail at google dot com
  2020-09-14  8:44 ` [Bug default/26309] Changes to underlying type of typedef mishandled in leaf reporting mode dodji at redhat dot com
  2020-09-14 10:46 ` dodji at redhat dot com
@ 2020-09-15  7:35 ` dodji at redhat dot com
  2020-09-16 15:57 ` dodji at redhat dot com
  2020-09-16 16:16 ` dodji at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: dodji at redhat dot com @ 2020-09-15  7:35 UTC (permalink / raw)
  To: libabigail

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

dodji at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from dodji at redhat dot com ---
The patch for this was applied to the master branch of the git repository at
https://sourceware.org/git/?p=libabigail.git;a=commit;h=3d7916caa4614eae1e59995123ed571e4f385368

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

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

* [Bug default/26309] Changes to underlying type of typedef mishandled in leaf reporting mode
  2020-07-28 16:05 [Bug default/26309] New: abidiff --leaf-changes-only asserts on typedef change gprocida+abigail at google dot com
                   ` (2 preceding siblings ...)
  2020-09-15  7:35 ` dodji at redhat dot com
@ 2020-09-16 15:57 ` dodji at redhat dot com
  2020-09-16 16:16 ` dodji at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: dodji at redhat dot com @ 2020-09-16 15:57 UTC (permalink / raw)
  To: libabigail

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

--- Comment #3 from dodji at redhat dot com ---
*** Bug 26084 has been marked as a duplicate of this bug. ***

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

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

* [Bug default/26309] Changes to underlying type of typedef mishandled in leaf reporting mode
  2020-07-28 16:05 [Bug default/26309] New: abidiff --leaf-changes-only asserts on typedef change gprocida+abigail at google dot com
                   ` (3 preceding siblings ...)
  2020-09-16 15:57 ` dodji at redhat dot com
@ 2020-09-16 16:16 ` dodji at redhat dot com
  4 siblings, 0 replies; 6+ 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=26309

--- Comment #4 from dodji at redhat dot com ---
*** Bug 26085 has been marked as a duplicate of this bug. ***

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

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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28 16:05 [Bug default/26309] New: abidiff --leaf-changes-only asserts on typedef change gprocida+abigail at google dot com
2020-09-14  8:44 ` [Bug default/26309] Changes to underlying type of typedef mishandled in leaf reporting mode dodji at redhat dot com
2020-09-14 10:46 ` dodji at redhat dot com
2020-09-15  7:35 ` dodji at redhat dot com
2020-09-16 15:57 ` dodji at redhat dot com
2020-09-16 16:16 ` 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).