From: Dodji Seketeli <dodji@redhat.com>
To: Dodji Seketeli <dodji@redhat.com>
Cc: libabigail@sourceware.org
Subject: [PATCH 13/16] ir: Really avoid canonicalizing decl-only classes
Date: Thu, 07 Sep 2023 16:07:08 +0200 [thread overview]
Message-ID: <87wmx2dqlv.fsf@redhat.com> (raw)
In-Reply-To: <87il8mglc1.fsf@redhat.com> (Dodji Seketeli's message of "Thu, 07 Sep 2023 15:32:46 +0200")
[-- Attachment #1: Type: text/plain, Size: 5334 bytes --]
Hello,
is_non_canonicalized_type uses is_declaration_only_class_or_union_type
to detect decl-only classes, but it doesn't differentiate between
decl-only classes that are associated to a class definition and those
that are not.
We want to avoid canonicalizing decl-only classes that are not
associated to any class definition.
This patch fixes the invocation of
is_declaration_only_class_or_union_type to express the above
assertion.
This fix uncovered another self-comparison issue that was being
expressed when running the command below:
$ abidw --abidiff tests/data/test-types-stability/PR27086-libstdc++.so.6.0.26
That one was due to an error in method_decl::set_linkage_name which
was making classes contain the wrong overloads of methods. The patch
fixes that error too.
* include/abg-fwd.h (is_pointer_to_decl_only_class_or_union_type)
(is_reference_to_decl_only_class_or_union_type)
(is_typedef_to_decl_only_class_or_union_type): Remove declarations.
(is_typedef_ptr_or_ref_to_decl_only_class_or_union_type): Declare
new function.
* src/abg-ir.cc (is_pointer_to_decl_only_class_or_union_type)
(is_reference_to_decl_only_class_or_union_type)
(is_typedef_to_decl_only_class_or_union_type): Remove definitions.
(is_typedef_ptr_or_ref_to_decl_only_class_or_union_type): Define
new function.
(is_non_canonicalized_type): Change the invocation of
is_declaration_only_class_or_union_type to make it look through
decl-only types. Use
is_typedef_ptr_or_ref_to_decl_only_class_or_union_type in lieu of
is_{pointer,reference,typedef}_to_decl_only_class_or_union_type
that got removed.
(method_decl::set_linkage_name): Remove the mapping between the
method and the old linkage name, only if the old name is different
from the new name. Duh.
* tests/data/test-annotate/libtest23.so.abi: Adjust.
* tests/data/test-annotate/test15-pr18892.so.abi: Likewise.
* tests/data/test-annotate/test17-pr19027.so.abi: Likewise.
* tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
Likewise.
* tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
Likewise.
* tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi:
Likewise.
* tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
* tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi:
Likewise.
* tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Likewise.
* tests/data/test-read-dwarf/PR25007-sdhci.ko.abi: Likewise.
* tests/data/test-read-dwarf/libtest23.so.abi: Likewise.
* tests/data/test-read-dwarf/test-libaaudio.so.abi: Likewise.
* tests/data/test-read-dwarf/test-libandroid.so.abi: Likewise.
* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
* tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
* tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
* tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
* tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
* tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
Likewise.
* tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
Likewise.
* tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
Likewise.
* tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
* tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
Likewise.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Applied to master.
---
include/abg-fwd.h | 8 +-
src/abg-ir.cc | 68 +-
tests/data/test-annotate/libtest23.so.abi | 363 +-
.../data/test-annotate/test15-pr18892.so.abi | 55 -
.../data/test-annotate/test17-pr19027.so.abi | 934 +-
...st18-pr19037-libvtkRenderingLIC-6.1.so.abi | 5832 +--
...19-pr19023-libtcmalloc_and_profiler.so.abi | 7483 ++--
...st20-pr19025-libvtkParallelCore-6.1.so.abi | 7566 ++--
.../data/test-annotate/test21-pr19092.so.abi | 88 +-
.../PR22015-libboost_iostreams.so.abi | 682 +-
.../test-read-dwarf/PR22122-libftdc.so.abi | 13186 +++----
.../data/test-read-dwarf/PR25007-sdhci.ko.abi | 8778 ++---
tests/data/test-read-dwarf/libtest23.so.abi | 358 +-
.../test-read-dwarf/test-libaaudio.so.abi | 4 +-
.../test-read-dwarf/test-libandroid.so.abi | 1544 +-
.../test-read-dwarf/test10-pr18818-gcc.so.abi | 1391 +-
.../test-read-dwarf/test11-pr18828.so.abi | 11160 +++---
.../test-read-dwarf/test12-pr18844.so.abi | 23647 ++++++------
.../test-read-dwarf/test15-pr18892.so.abi | 42 -
.../test-read-dwarf/test16-pr18904.so.abi | 15271 ++++----
.../test-read-dwarf/test17-pr19027.so.abi | 894 +-
...st18-pr19037-libvtkRenderingLIC-6.1.so.abi | 5738 +--
...19-pr19023-libtcmalloc_and_profiler.so.abi | 7239 ++--
...st20-pr19025-libvtkParallelCore-6.1.so.abi | 7277 ++--
.../test-read-dwarf/test21-pr19092.so.abi | 82 +-
.../test22-pr19097-libstdc++.so.6.0.17.so.abi | 31278 ++++++++--------
.../test9-pr18818-clang.so.abi | 2691 +-
27 files changed, 76386 insertions(+), 77273 deletions(-)
The file is too large for the mailing list so I am attaching it gzipped.
[-- Attachment #2: 0013-ir-Really-avoid-canonicalizing-decl-only-classes.patch.gz --]
[-- Type: application/gzip, Size: 1569870 bytes --]
[-- Attachment #3: Type: text/plain, Size: 13 bytes --]
--
Dodji
next prev parent reply other threads:[~2023-09-07 14:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-07 13:32 [PATCH 00/16] Fixing various issues found while working on PR30309 Dodji Seketeli
2023-09-07 13:34 ` [PATCH 01/16] reader: fix indentation Dodji Seketeli
2023-09-07 13:35 ` [PATCH 02/16] tools-utils: Fix indentation Dodji Seketeli
2023-09-07 13:38 ` [PATCH 03/16] dwarf-reader,ir: Make logging a property of the middle end Dodji Seketeli
2023-09-07 13:39 ` [PATCH 04/16] dwarf-reader: Fix some logging Dodji Seketeli
2023-09-07 13:39 ` [PATCH 05/16] abipkgdiff: Initialize libxml2 to use it in a multi-thread context Dodji Seketeli
2023-09-07 13:40 ` [PATCH 06/16] tools-utils: Avoid endless loop Dodji Seketeli
2023-09-07 13:41 ` [PATCH 07/16] {dwarf,elf}reader: Don't consider no symbol table as an error Dodji Seketeli
2023-09-07 13:41 ` [PATCH 08/16] abipkgdiff: Avoid comparing binaries that are outside of the package Dodji Seketeli
2023-09-07 13:42 ` [PATCH 09/16] ir: Add missing ABG_RETURN in the comparison engine Dodji Seketeli
2023-09-07 14:02 ` [PATCH 10/16] ir: Add fn types to type lookup maps Dodji Seketeli
2023-09-07 14:03 ` [PATCH 11/16] ir: Fix forgetting canonicalizing some function types Dodji Seketeli
2023-09-07 14:05 ` [PATCH 12/16] ir: Avoid forgetting potential seemingly duplicated member functions Dodji Seketeli
2023-09-07 14:07 ` Dodji Seketeli [this message]
2023-09-07 14:08 ` [PATCH 14/16] ir: Use non qualified typedef name for type canonicalization Dodji Seketeli
2023-09-07 14:09 ` [PATCH 15/16] ir: Fix qualification as non-confirmed propagated canonical types Dodji Seketeli
2023-09-07 14:10 ` [PATCH 16/16] dwarf-reader: Do not re-use typedefs in a scope Dodji Seketeli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wmx2dqlv.fsf@redhat.com \
--to=dodji@redhat.com \
--cc=libabigail@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).