[0/3,applied] Bug 29857 - Fix comparing binary with decl-only unions & cycles

Message ID 87wn6ne30e.fsf@redhat.com
Headers
Series Bug 29857 - Fix comparing binary with decl-only unions & cycles |

Message

Dodji Seketeli Dec. 19, 2022, 5:07 p.m. UTC
  Hello,

Fixing the problem reported at
https://sourceware.org/bugzilla/show_bug.cgi?id=29857 involves
addressing several issues.

The first patch of this series addresses the fact that in some cases,
when comparing decl-only types, the comparison engine can pop
comparison operands that haven't been pushed to the comparison stack,
leading to some assert violation.

Then, I realized that several occurences of a given type (due to
DWARF-related type duplication) are considered different because of
comparing decl-only unions against their definition; this is because
decl-only unions are not yet resolved to their definition, unlike what
is done already for classes and enums.  The second patch adds support
for resolving decl-only unions to their definition.  This drastically
reduces the amount of spurious type changes that were causing lots of
issues down the road.

Fixing that second issue uncovered a third one which is basically
related to undetected cycles in the type graph, while comparing types
for canonicalization purposes.  Those undected cycles are leading to
infinite loops during structural comparison of types.  This is fixed
in the third patch.

Together, these three patches should fix bugs 29857 and 29901.

Dodji Seketeli (3):
  Bug 29857 - Don't pop comparison operands that haven't been pushed
  Bug 29857 - dwarf-reader: Resolve decl-only unions
  Bug 29857 - Better detect comparison cycles in type graph

 include/abg-fwd.h                             |    9 +
 src/abg-dwarf-reader.cc                       |   60 +-
 src/abg-ir-priv.h                             |   94 +-
 src/abg-ir.cc                                 |   59 +-
 ...19-pr19023-libtcmalloc_and_profiler.so.abi | 9003 +++++++++--------
 ...19-pr19023-libtcmalloc_and_profiler.so.abi | 8969 ++++++++--------
 6 files changed, 9100 insertions(+), 9094 deletions(-)