From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 85CDA395B81A; Thu, 18 Jun 2020 16:48:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 85CDA395B81A From: "gprocida+abigail at google dot com" To: libabigail@sourceware.org Subject: [Bug default/26135] New: Possible issue with type equality Date: Thu, 18 Jun 2020 16:48:08 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: libabigail X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gprocida+abigail at google dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dodji at redhat dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 16:48:08 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26135 Bug ID: 26135 Summary: Possible issue with type equality 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: --- The patch below may indicate a potential issue with type equality in libabi= gail (note that this builds on the patch in https://sourceware.org/pipermail/libabigail/2020q2/002355.html). runtestreaddwarf reveals some instances where types_defined_same_linux_kernel_corpus_public returns true for types that compare as unequal. I think they are all anonymous structs with naming typedefs. Regards, Giuliano >From dd249b7dc83df3609c23ec237a7ddb94e29abf44 Mon Sep 17 00:00:00 2001 From: Giuliano Procida Date: Thu, 18 Jun 2020 13:50:59 +0100 Subject: [PATCH] check linux optimisation --- src/abg-ir.cc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/abg-ir.cc b/src/abg-ir.cc index 41a8e3f9..a8096690 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -11904,8 +11904,18 @@ type_base::get_canonical_type_for(type_base_sptr t) // Compare types by considering that decl-only classes don't // equal their definition. env->decl_only_class_equals_definition(false); - bool equal =3D types_defined_same_linux_kernel_corpus_public(**it= , *t) - || *it =3D=3D t; + bool linux_eq =3D types_defined_same_linux_kernel_corpus_public(**it, *t); + bool plain_eq =3D *it =3D=3D t; + // is it really just an optimisation? + if (linux_eq > plain_eq) + { + std::cerr << "type equality discrepancy with " + << t->get_pretty_representation() + << " and " + << (*it)->get_pretty_representation() + << std::endl; + } + bool equal =3D linux_eq || plain_eq; // Restore the state of the on-the-fly-canonicalization and // the decl-only-class-being-equal-to-a-matching-definition // flags. -- 2.27.0.290.gba653c62da-goog --=20 You are receiving this mail because: You are on the CC list for the bug.=