From patchwork Thu Aug 29 15:54:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 96705 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C0B15385EC25 for ; Thu, 29 Aug 2024 15:55:03 +0000 (GMT) X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 2F1363858402 for ; Thu, 29 Aug 2024 15:54:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2F1363858402 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2F1363858402 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724946898; cv=none; b=UwbwbFEyU/fva/5VxklfeMje2k/MNlViTkFil1fzxDUnLqKbSVa7jjeReDO7646+mmw27SWJdrND4tXf84lVHbOxP3GwwepyyfUAVnEgcIQwjTFOf3TCCIESNYHoIhF2MwXcexcN5KiJmKObH63yyJWcfbCtkpekBRzeFl9r/wg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724946898; c=relaxed/simple; bh=Q5eD4I0Vf2AbYSy/e42xnPfFeh0ShWmTtwKcCR3Iuzk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=owirT1EjvXHsN1TaKWdi6DH43DC8jsorGJAzBztbzitNj2yUtoF0v+xIAXTCpnnR7xYs8zGSkkpAMioIc08wDi1cv6UBurm+zRWcQQCmVHxBCyJD4S0UKxXmP29JLhjoc7gJhteTDK+XPVylJUV2Cr969JgCwRFuGlEqAr0idN8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724946891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=B4RGUNt/PZ36m6q11gBEw1Z7qnOjAI6YiaGNSEwf2Qw=; b=iwv0qB37p4JwAqzxefKiAfW0c2LWz6QBpYJuCrTaTRXo29HFoMlVzbfy2Bs2le80gijOq4 tz/BeJFnFSSr+K6JXHaLf4hzlWHKVpgKdpDfuQKaETjcGOp4L6fKUE5TI9hzobtdF6FYJK 8Q/x2d8jKBPEvETVmizVmZtcHD+4J2c= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-141-t8Q27XaUPrOCM28WKqmB2w-1; Thu, 29 Aug 2024 11:54:50 -0400 X-MC-Unique: t8Q27XaUPrOCM28WKqmB2w-1 Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-7a1dc1e5662so117522285a.2 for ; Thu, 29 Aug 2024 08:54:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724946890; x=1725551690; h=mime-version:user-agent:message-id:in-reply-to:date:references :organization:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=B4RGUNt/PZ36m6q11gBEw1Z7qnOjAI6YiaGNSEwf2Qw=; b=RwMkwvPK1TJ5ELke1XKfVbjiPZjCwlRgDktM1ItBq2481ljPenWyQQVZhXdtaUC5yP sI7Sqe6QaEjJwM6m8s2hVf/HLFa2742w7v9JZMBREKjkAHkii5BZH7D4YtfNbb+QEOi/ 0saFcCbI+UInIQiGk0M6wHrUdjPUwSMtS7qxG29gqKeSxZf6MpWN4Pc6qt36IPE6yEet 48duHwoMeI6KjSRnbZXEjgisQdbh8GujlM3nPLY9hQM+h0dZKEJKXb4bIX/tTiEaOFsi RC2U4cfAuCe4bhctSocmh+mdzNh1ISefC551jaZsJRV4aiN+m3a/x/QJY8P7fIOGEbRu s7Mw== X-Gm-Message-State: AOJu0YwZQdGn45bCQQ9VYJFuPJytYCv39nhYfzhUZ5um6C0fhS350bfG kzoJ7Q3lp1leGrIBl4IT1R9bdhMU4TV7r57pREsdgiYulvl85jM0/7SQWZ0ldgMfYRXhqd5su9Y iTwGkoHjFjVC7ch4l8ZLZTd+Q2NWn43WylRyA/YB2jINAaMT63v5me+IwGGmOV3Y+Bg== X-Received: by 2002:a05:620a:404a:b0:7a6:6465:bf5c with SMTP id af79cd13be357-7a804164d42mr413739585a.12.1724946888208; Thu, 29 Aug 2024 08:54:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH8nw/OnXl80BqmDsUzECuRhxMiKO3HZ9KTfhKtwRa06ZOw8b0+GbCesES4SxpES/hUh7rGUw== X-Received: by 2002:a05:620a:404a:b0:7a6:6465:bf5c with SMTP id af79cd13be357-7a804164d42mr413732185a.12.1724946886916; Thu, 29 Aug 2024 08:54:46 -0700 (PDT) Received: from localhost (88-120-130-27.subs.proxad.net. [88.120.130.27]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-45682d66c9dsm5870111cf.76.2024.08.29.08.54.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 08:54:46 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id 46578503C602; Thu, 29 Aug 2024 17:54:44 +0200 (CEST) From: Dodji Seketeli To: dodji@redhat.com Cc: libabigail@sourceware.org Subject: [PATCH 02/27] ir: Remove the now useless type propagation optimization Organization: Me, myself and I References: <20240829154711.1883174-1-dodji@redhat.com> X-Operating-System: AlmaLinux 9.4 X-URL: http://www.seketeli.net/~dodji Date: Thu, 29 Aug 2024 17:54:44 +0200 In-Reply-To: <20240829154711.1883174-1-dodji@redhat.com> (dodji@redhat.com's message of "Thu, 29 Aug 2024 17:46:29 +0200") Message-ID: <871q27nx2z.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libabigail-bounces~patchwork=sourceware.org@sourceware.org Hello, Now that the type hashing patch is in, I figure we can do away with the overly complicated type propagation optimization. The type propagating optimization is disabled by the type hashing patch anyway so this is overdue now. The nice thing about this is that we are dropping a big complicated code with no noticeable speed penalty \o/ * configure.ac: Remove the now useless --enable-ct-propagation option. * include/abg-ir.h (environment::do_on_the_fly_canonicalization): Remove member function declaration. * src/abg-ir-priv.h (type_base::priv::{depends_on_recursive_type_, canonical_type_propagated_, propagated_canonical_type_confirmed_}): Remove data members. (type_base::priv::priv): Update. (type_base::priv::{depends_on_recursive_type, set_depends_on_recursive_type, set_does_not_depend_on_recursive_type, canonical_type_propagated, set_canonical_type_propagated, propagated_canonical_type_confirmed, set_propagated_canonical_type_confirmed, clear_propagated_canonical_type}): Remove member functions. (environment::priv::{types_with_non_confirmed_propagated_ct_, recursive_types_, types_with_cleared_propagated_ct_, do_on_the_fly_canonicalization_}): Remove data members. (environment::priv::priv): Adjust. (environment::priv::{mark_dependant_types, mark_dependant_types_compared_until}): Update comment. (environment::priv::{mark_dependant_types, mark_dependant_types_compared_until, is_recursive_type, propagate_ct, confirm_ct_propagation_for_types_dependant_on, confirm_ct_propagation, confirm_ct_propagation, types_with_cleared_propagated_ct, types_with_cleared_propagated_ct, record_type_with_cleared_propagated_canonical_type, erase_type_with_cleared_propagated_canonical_type, collect_types_that_depends_on, cancel_ct_propagation_for_types_dependant_on, cancel_ct_propagation, clear_propagated_canonical_type, add_to_types_with_non_confirmed_propagated_ct, remove_from_types_with_non_confirmed_propagated_ct, cancel_all_non_confirmed_propagated_canonical_types}): Remove. (canonicalize_types): Remove canonical type propagation debugging code. * src/abg-ir.cc (mark_dependant_types_compared_until): Remove function. (RETURN_TRUE_IF_COMPARISON_CYCLE_DETECTED): Adjust, do not use the removed mark_dependant_types_compared_until. (return_comparison_result): Remove handling of the canonical type propagation optimization. (environment::do_on_the_fly_canonicalization): Remove member functions. (maybe_propagate_canonical_type, maybe_propagate_canonical_type) (maybe_cancel_propagated_canonical_type, ): Remove functions. (compare_canonical_type_against_candidate, canonicalize): Remove handling of the canonical type propagation optimization. (equals): In the overload for class_or_union, adjust call to return_comparison_result. In the overload for class_decl, remove call to maybe_cancel_propagated_canonical_type. (OnTheFlyCanonicalization): Remove this doxygen documentation module describing the canonical type propagation optimization. Signed-off-by: Dodji Seketeli --- configure.ac | 15 -- include/abg-ir.h | 6 - src/abg-ir-priv.h | 643 +--------------------------------------------- src/abg-ir.cc | 388 +--------------------------- 4 files changed, 11 insertions(+), 1041 deletions(-) diff --git a/configure.ac b/configure.ac index be289b31..07cebf32 100644 --- a/configure.ac +++ b/configure.ac @@ -134,11 +134,6 @@ AC_ARG_ENABLE(debug-type-canonicalization, ENABLE_DEBUG_TYPE_CANONICALIZATION=$enableval, ENABLE_DEBUG_TYPE_CANONICALIZATION=no) -AC_ARG_ENABLE(debug-ct-propagation, - AS_HELP_STRING([--enable-debug-ct-propagation=yes|no], - [enable debugging of canonical type propagation (default is no)]), - ENABLE_DEBUG_CT_PROPAGATION=$enableval, - ENABLE_DEBUG_CT_PROPAGATION=no) AC_ARG_ENABLE(show-type-use-in-abilint, AS_HELP_STRING([--enable-show-type-use-in-abilint=yes|no], @@ -611,15 +606,6 @@ fi AM_CONDITIONAL(ENABLE_DEBUG_TYPE_CANONICALIZATION, test x$ENABLE_DEBUG_TYPE_CANONICALIZATION = xyes) -if test x$ENABLE_DEBUG_CT_PROPAGATION = xyes; then - AC_DEFINE([WITH_DEBUG_CT_PROPAGATION], - 1, - [compile support of debugging canonical type propagation]) - AC_MSG_NOTICE([support of debugging canonical type propagation is enabled]) -else - AC_MSG_NOTICE([support of debugging canonical type propagation is disabled]) -fi - dnl Check for the dpkg program if test x$ENABLE_DEB = xauto -o x$ENABLE_DEB = xyes; then AC_CHECK_PROG(HAS_DPKG, dpkg, yes, no) @@ -1297,7 +1283,6 @@ AC_MSG_NOTICE([ Enable abilint --show-type-use : ${ENABLE_SHOW_TYPE_USE_IN_ABILINT} Enable self comparison debugging : ${ENABLE_DEBUG_SELF_COMPARISON} Enable type canonicalization debugging : ${ENABLE_DEBUG_TYPE_CANONICALIZATION} - Enable propagated canonical type debugging : ${ENABLE_DEBUG_CT_PROPAGATION} Enable deb support in abipkgdiff : ${ENABLE_DEB} Enable GNU tar archive support in abipkgdiff : ${ENABLE_TAR} Enable bash completion : ${ENABLE_BASH_COMPLETION} diff --git a/include/abg-ir.h b/include/abg-ir.h index 5372f069..001db6d0 100644 --- a/include/abg-ir.h +++ b/include/abg-ir.h @@ -185,12 +185,6 @@ public: void canonicalization_is_done(bool); - bool - do_on_the_fly_canonicalization() const; - - void - do_on_the_fly_canonicalization(bool f); - bool decl_only_class_equals_definition() const; diff --git a/src/abg-ir-priv.h b/src/abg-ir-priv.h index d8d4579c..a184b804 100644 --- a/src/abg-ir-priv.h +++ b/src/abg-ir-priv.h @@ -475,23 +475,12 @@ struct type_base::priv // representation strings here. interned_string internal_cached_repr_; interned_string cached_repr_; - // The next two data members are used while comparing types during - // canonicalization. They are useful for the "canonical type - // propagation" (aka on-the-fly-canonicalization) optimization - // implementation. - - // The set of canonical recursive types this type depends on. - unordered_set depends_on_recursive_type_; - bool canonical_type_propagated_; - bool propagated_canonical_type_confirmed_; priv() : size_in_bits(), alignment_in_bits(), canonical_type_index(), - naked_canonical_type(), - canonical_type_propagated_(false), - propagated_canonical_type_confirmed_(false) + naked_canonical_type() {} priv(size_t s, @@ -501,140 +490,8 @@ struct type_base::priv alignment_in_bits(a), canonical_type_index(), canonical_type(c), - naked_canonical_type(c.get()), - canonical_type_propagated_(false), - propagated_canonical_type_confirmed_(false) + naked_canonical_type(c.get()) {} - - /// Test if the current type depends on recursive type comparison. - /// - /// A recursive type T is a type T which has a sub-type that is T - /// (recursively) itself. - /// - /// So this function tests if the current type has a recursive - /// sub-type or is a recursive type itself. - /// - /// @return true if the current type depends on a recursive type. - bool - depends_on_recursive_type() const - {return !depends_on_recursive_type_.empty();} - - /// Test if the current type depends on a given recursive type. - /// - /// A recursive type T is a type T which has a sub-type that is T - /// (recursively) itself. - /// - /// So this function tests if the current type depends on a given - /// recursive type. - /// - /// @param dependant the type we want to test if the current type - /// depends on. - /// - /// @return true if the current type depends on the recursive type - /// @dependant. - bool - depends_on_recursive_type(const type_base* dependant) const - { - return - (depends_on_recursive_type_.find(reinterpret_cast(dependant)) - != depends_on_recursive_type_.end()); - } - - /// Set the flag that tells if the current type depends on a given - /// recursive type. - /// - /// A recursive type T is a type T which has asub-type that is T - /// (recursively) itself. - /// - /// So this function tests if the current type depends on a - /// recursive type. - /// - /// @param t the recursive type that current type depends on. - void - set_depends_on_recursive_type(const type_base * t) - {depends_on_recursive_type_.insert(reinterpret_cast(t));} - - /// Unset the flag that tells if the current type depends on a given - /// recursive type. - /// - /// A recursive type T is a type T which has asub-type that is T - /// (recursively) itself. - /// - /// So this function flags the current type as not being dependant - /// on a given recursive type. - /// - /// - /// @param t the recursive type to consider. - void - set_does_not_depend_on_recursive_type(const type_base *t) - {depends_on_recursive_type_.erase(reinterpret_cast(t));} - - /// Flag the current type as not being dependant on any recursive type. - void - set_does_not_depend_on_recursive_type() - {depends_on_recursive_type_.clear();} - - /// Test if the type carries a canonical type that is the result of - /// maybe_propagate_canonical_type(), aka, "canonical type - /// propagation optimization". - /// - /// @return true iff the current type carries a canonical type that - /// is the result of canonical type propagation. - bool - canonical_type_propagated() - {return canonical_type_propagated_;} - - /// Set the flag that says if the type carries a canonical type that - /// is the result of maybe_propagate_canonical_type(), aka, - /// "canonical type propagation optimization". - /// - /// @param f true iff the current type carries a canonical type that - /// is the result of canonical type propagation. - void - set_canonical_type_propagated(bool f) - {canonical_type_propagated_ = f;} - - /// Getter of the property propagated-canonical-type-confirmed. - /// - /// If canonical_type_propagated() returns true, then this property - /// says if the propagated canonical type has been confirmed or not. - /// If it hasn't been confirmed, then it means it can still - /// cancelled. - /// - /// @return true iff the propagated canonical type has been - /// confirmed. - bool - propagated_canonical_type_confirmed() const - {return propagated_canonical_type_confirmed_;} - - /// Setter of the property propagated-canonical-type-confirmed. - /// - /// If canonical_type_propagated() returns true, then this property - /// says if the propagated canonical type has been confirmed or not. - /// If it hasn't been confirmed, then it means it can still - /// cancelled. - /// - /// @param f If this is true then the propagated canonical type has - /// been confirmed. - void - set_propagated_canonical_type_confirmed(bool f) - {propagated_canonical_type_confirmed_ = f;} - - /// If the current canonical type was set as the result of the - /// "canonical type propagation optimization", then clear it. - bool - clear_propagated_canonical_type() - { - if (canonical_type_propagated_ && !propagated_canonical_type_confirmed_) - { - canonical_type.reset(); - naked_canonical_type = nullptr; - set_canonical_type_propagated(false); - canonical_type_index = 0; - return true; - } - return false; - } }; // end struct type_base::priv bool @@ -739,28 +596,9 @@ struct environment::priv // -------- ------------- // | T_R | R_OP0 | R_OP1 | <-- this goes into right_type_comp_operands_; // - // This "stack of operands of the current type comparison, during - // type canonicalization" is used in the context of the @ref - // OnTheFlyCanonicalization optimization. It's used to detect if a - // sub-type of the type being canonicalized depends on a recursive - // type. vector left_type_comp_operands_; vector right_type_comp_operands_; - // Vector of types that protentially received propagated canonical types. - // If the canonical type propagation is confirmed, the potential - // canonical types must be promoted as canonical types. Otherwise if - // the canonical type propagation is cancelled, the canonical types - // must be cleared. - pointer_set types_with_non_confirmed_propagated_ct_; - pointer_set recursive_types_; -#ifdef WITH_DEBUG_CT_PROPAGATION - // Set of types which propagated canonical type has been cleared - // during the "canonical type propagation optimization" phase. Those - // types are tracked in this set to ensure that they are later - // canonicalized. This means that at the end of the - // canonicalization process, this set must be empty. - mutable pointer_set types_with_cleared_propagated_ct_; -#endif + #ifdef WITH_DEBUG_SELF_COMPARISON // This is used for debugging purposes. // When abidw is used with the option --debug-abidiff, some @@ -782,7 +620,6 @@ struct environment::priv unordered_map pointer_type_id_map_; #endif bool canonicalization_is_done_; - bool do_on_the_fly_canonicalization_; bool decl_only_class_equals_definition_; bool use_enum_binary_only_equality_; bool allow_type_comparison_results_caching_; @@ -810,7 +647,6 @@ struct environment::priv priv() : canonicalization_is_done_(), - do_on_the_fly_canonicalization_(true), decl_only_class_equals_definition_(false), use_enum_binary_only_equality_(true), allow_type_comparison_results_caching_(false), @@ -907,8 +743,8 @@ struct environment::priv type_comparison_result_type::const_iterator it = type_comparison_results_cache_.find - (std::make_pair(reinterpret_cast(&first), - reinterpret_cast(&second))); + (std::make_pair(reinterpret_cast(&first), + reinterpret_cast(&second))); if (it == type_comparison_results_cache_.end()) return false; @@ -966,463 +802,6 @@ struct environment::priv right_type_comp_operands_.pop_back(); } - /// Mark all the types that comes after a certain one as NOT being - /// eligible for the canonical type propagation optimization. - /// - /// @param type the type that represents the "marker type". All - /// types after this one will be marked as being NON-eligible to - /// the canonical type propagation optimization. - /// - /// @param types the set of types to consider. In that vector, all - /// types that come after @p type are going to be marked as being - /// non-eligible to the canonical type propagation optimization. - /// - /// @return true iff the operation was successful. - bool - mark_dependant_types(const type_base* type, - vector& types) - { - bool found = false; - for (auto t : types) - { - if (!found - && (reinterpret_cast(t) - == reinterpret_cast(type))) - { - found = true; - continue; - } - else if (found) - t->priv_->set_depends_on_recursive_type(type); - } - return found; - } - - /// In the stack of the current types being compared (as part of - /// type canonicalization), mark all the types that comes after a - /// certain one as NOT being eligible to the canonical type - /// propagation optimization. - /// - /// For a starter, please read about the @ref - /// OnTheFlyCanonicalization, aka, "canonical type propagation - /// optimization". - /// - /// To implement that optimization, we need, among other things to - /// maintain stack of the types (and their sub-types) being - /// currently compared as part of type canonicalization. - /// - /// Note that we only consider the type that is the right-hand-side - /// operand of the comparison because it's that one that is being - /// canonicalized and thus, that is not yet canonicalized. - /// - /// The reason why a type is deemed NON-eligible to the canonical - /// type propagation optimization is that it "depends" on - /// recursively present type. Let me explain. - /// - /// Suppose we have a type T that has sub-types named ST0 and ST1. - /// Suppose ST1 itself has a sub-type that is T itself. In this - /// case, we say that T is a recursive type, because it has T - /// (itself) as one of its sub-types: - /// - /// T - /// +-- ST0 - /// | - /// +-- ST1 - /// + - /// | - /// +-- T - /// - /// ST1 is said to "depend" on T because it has T as a sub-type. - /// But because T is recursive, then ST1 is said to depend on a - /// recursive type. Notice however that ST0 does not depend on any - /// recursive type. - /// - /// When we are at the point of comparing the sub-type T of ST1 - /// against its counterpart, the stack of the right-hand-side - /// operands of the type canonicalization is going to look like - /// this: - /// - /// | T | ST1 | - /// - /// We don't add the type T to the stack as we detect that T was - /// already in there (recursive cycle). - /// - /// So, this function will basically mark ST1 as being NON-eligible - /// to being the target of canonical type propagation. - /// - /// @param right the right-hand-side operand of the type comparison. - /// - /// @return true iff the operation was successful. - bool - mark_dependant_types_compared_until(const type_base* right) - { - bool result = false; - - result |= - mark_dependant_types(right, - right_type_comp_operands_); - recursive_types_.insert(reinterpret_cast(right)); - return result; - } - - /// Test if a type is a recursive one. - /// - /// @param t the type to consider. - /// - /// @return true iff @p t is recursive. - bool - is_recursive_type(const type_base* t) - { - return (recursive_types_.find(reinterpret_cast(t)) - != recursive_types_.end()); - } - - - /// Unflag a type as being recursive - /// - /// @param t the type to unflag - void - set_is_not_recursive(const type_base* t) - {recursive_types_.erase(reinterpret_cast(t));} - - /// Propagate the canonical type of a type to another one. - /// - /// @param src the type to propagate the canonical type from. - /// - /// @param dest the type to propagate the canonical type of @p src - /// to. - /// - /// @return bool iff the canonical was propagated. - bool - propagate_ct(const type_base& src, const type_base& dest) - { - type_base_sptr canonical = src.get_canonical_type(); - ABG_ASSERT(canonical); - dest.priv_->canonical_type = canonical; - dest.priv_->naked_canonical_type = canonical.get(); - dest.priv_->set_canonical_type_propagated(true); - dest.priv_->canonical_type_index = canonical->priv_->canonical_type_index; -#ifdef WITH_DEBUG_CT_PROPAGATION - // If dest was previously a type which propagated canonical type - // has been cleared, let the book-keeping system know. - erase_type_with_cleared_propagated_canonical_type(&dest); -#endif - return true; - } - - /// Mark a set of types that have been the target of canonical type - /// propagation and that depend on a recursive type as being - /// permanently canonicalized. - /// - /// To understand the sentence above, please read the description of - /// type canonicalization and especially about the "canonical type - /// propagation optimization" at @ref OnTheFlyCanonicalization, in - /// the src/abg-ir.cc file. - void - confirm_ct_propagation_for_types_dependant_on(const type_base* dependant_type) - { - pointer_set to_remove; - for (auto i : types_with_non_confirmed_propagated_ct_) - { - type_base *t = reinterpret_cast(i); - t->priv_->set_does_not_depend_on_recursive_type(dependant_type); - if (!t->priv_->depends_on_recursive_type()) - { - to_remove.insert(i); - t->priv_->set_propagated_canonical_type_confirmed(true); - ABG_ASSERT(t->priv_->canonical_type_propagated_ - && t->priv_->naked_canonical_type); -#ifdef WITH_DEBUG_SELF_COMPARISON - check_abixml_canonical_type_propagation_during_self_comp(t); -#endif - } - } - - for (auto i : to_remove) - types_with_non_confirmed_propagated_ct_.erase(i); - } - - /// Mark a type that has been the target of canonical type - /// propagation as being permanently canonicalized. - /// - /// This function also marks the set of types that have been the - /// target of canonical type propagation and that depend on a - /// recursive type as being permanently canonicalized. - /// - /// To understand the sentence above, please read the description of - /// type canonicalization and especially about the "canonical type - /// propagation optimization" at @ref OnTheFlyCanonicalization, in - /// the src/abg-ir.cc file. - void - confirm_ct_propagation(const type_base*t) - { - if (!t || t->priv_->propagated_canonical_type_confirmed()) - return; - - const environment& env = t->get_environment(); - - env.priv_->confirm_ct_propagation_for_types_dependant_on(t); - t->priv_->set_does_not_depend_on_recursive_type(); - env.priv_->remove_from_types_with_non_confirmed_propagated_ct(t); - env.priv_->set_is_not_recursive(t); - t->priv_->set_propagated_canonical_type_confirmed(true); - ABG_ASSERT(t->priv_->canonical_type_propagated_ - && t->priv_->naked_canonical_type); -#ifdef WITH_DEBUG_SELF_COMPARISON - check_abixml_canonical_type_propagation_during_self_comp(t); -#endif - } - - /// Mark all the types that have been the target of canonical type - /// propagation and that are not yet confirmed as being permanently - /// canonicalized (aka confirmed). - /// - /// To understand the sentence above, please read the description of - /// type canonicalization and especially about the "canonical type - /// propagation optimization" at @ref OnTheFlyCanonicalization, in - /// the src/abg-ir.cc file. - void - confirm_ct_propagation() - { - for (auto i : types_with_non_confirmed_propagated_ct_) - { - type_base *t = reinterpret_cast(i); - t->priv_->set_does_not_depend_on_recursive_type(); - t->priv_->set_propagated_canonical_type_confirmed(true); - ABG_ASSERT(t->priv_->canonical_type_propagated_ - && t->priv_->naked_canonical_type); -#ifdef WITH_DEBUG_SELF_COMPARISON - check_abixml_canonical_type_propagation_during_self_comp(t); -#endif - } - types_with_non_confirmed_propagated_ct_.clear(); - } - -#ifdef WITH_DEBUG_CT_PROPAGATION - /// Getter for the set of types which propagated canonical type has - /// been cleared during the "canonical type propagation - /// optimization" phase. Those types are tracked in this set to - /// ensure that they are later canonicalized. This means that at - /// the end of the canonicalization process, this set must be empty. - /// - /// @return the set of types which propagated canonical type has - /// been cleared. - const pointer_set& - types_with_cleared_propagated_ct() const - {return types_with_cleared_propagated_ct_;} - - /// Getter for the set of types which propagated canonical type has - /// been cleared during the "canonical type propagation - /// optimization" phase. Those types are tracked in this set to - /// ensure that they are later canonicalized. This means that at - /// the end of the canonicalization process, this set must be empty. - /// - /// @return the set of types which propagated canonical type has - /// been cleared. - pointer_set& - types_with_cleared_propagated_ct() - {return types_with_cleared_propagated_ct_;} - - /// Record a type which propagated canonical type has been cleared - /// during the "canonical type propagation optimization phase". - /// - /// @param t the type to record. - void - record_type_with_cleared_propagated_canonical_type(const type_base* t) - { - uintptr_t ptr = reinterpret_cast(t); - types_with_cleared_propagated_ct_.insert(ptr); - } - - /// Erase a type (which propagated canonical type has been cleared - /// during the "canonical type propagation optimization phase") from - /// the set of types that have been recorded by the invocation of - /// record_type_with_cleared_propagated_canonical_type() - /// - /// @param t the type to erase from the set. - void - erase_type_with_cleared_propagated_canonical_type(const type_base* t) - { - uintptr_t ptr = reinterpret_cast(t); - types_with_cleared_propagated_ct_.erase(ptr); - } -#endif //WITH_DEBUG_CT_PROPAGATION - - /// Collect the types that depends on a given "target" type. - /// - /// Walk a set of types and if they depend directly or indirectly on - /// a "target" type, then collect them into a set. - /// - /// @param target the target type to consider. - /// - /// @param types the types to walk to detect those who depend on @p - /// target. - /// - /// @return true iff one or more type from @p types is found to - /// depend on @p target. - bool - collect_types_that_depends_on(const type_base *target, - const pointer_set& types, - pointer_set& collected) - { - bool result = false; - for (const auto i : types) - { - // First avoid infinite loop if we've already collected the - // current type. - if (collected.find(i) != collected.end()) - continue; - - type_base *t = reinterpret_cast(i); - if (t->priv_->depends_on_recursive_type(target)) - { - collected.insert(i); - collect_types_that_depends_on(t, types, collected); - result = true; - } - } - return result; - } - - /// Reset the canonical type (set it nullptr) of a set of types that - /// have been the target of canonical type propagation and that - /// depend on a given recursive type. - /// - /// Once the canonical type of a type in that set is reset, the type - /// is marked as being non-dependant on a recursive type anymore. - /// - /// To understand the sentences above, please read the description - /// of type canonicalization and especially about the "canonical - /// type propagation optimization" at @ref OnTheFlyCanonicalization, - /// in the src/abg-ir.cc file. - /// - /// @param target if a type which has been subject to the canonical - /// type propagation optimizationdepends on a this target type, then - /// cancel its canonical type. - void - cancel_ct_propagation_for_types_dependant_on(const type_base* target) - { - pointer_set to_remove; - collect_types_that_depends_on(target, - types_with_non_confirmed_propagated_ct_, - to_remove); - - for (auto i : to_remove) - { - type_base *t = reinterpret_cast(i); - ABG_ASSERT(t->get_environment().priv_->is_recursive_type(t) - || t->priv_->depends_on_recursive_type()); - type_base_sptr canonical = t->priv_->canonical_type.lock(); - if (canonical) - { - clear_propagated_canonical_type(t); - t->priv_->set_does_not_depend_on_recursive_type(); - } - } - - for (auto i : to_remove) - types_with_non_confirmed_propagated_ct_.erase(i); - } - - /// Reset the canonical type (set it nullptr) of a type that has - /// been the target of canonical type propagation. - /// - /// This also resets the propagated canonical type of the set of - /// types that depends on a given recursive type. - /// - /// Once the canonical type of a type in that set is reset, the type - /// is marked as being non-dependant on a recursive type anymore. - /// - /// To understand the sentences above, please read the description - /// of type canonicalization and especially about the "canonical - /// type propagation optimization" at @ref OnTheFlyCanonicalization, - /// in the src/abg-ir.cc file. - /// - /// @param target if a type which has been subject to the canonical - /// type propagation optimizationdepends on a this target type, then - /// cancel its canonical type. - void - cancel_ct_propagation(const type_base* t) - { - if (!t) - return; - - const environment& env = t->get_environment(); - env.priv_->cancel_ct_propagation_for_types_dependant_on(t); - // This cannot carry any tentative canonical type at this - // point. - clear_propagated_canonical_type(t); - // Reset the marking of the type as it no longer carries a - // tentative canonical type that might be later canceled. - t->priv_->set_does_not_depend_on_recursive_type(); - env.priv_->remove_from_types_with_non_confirmed_propagated_ct(t); - env.priv_->clear_type_comparison_results_cache(); - } - - /// Clear the propagated canonical type of a given type. - /// - /// This function also updates the book-keeping of the set of types - /// which propagated canonical types have been cleared. - /// - /// Please note that at the end of the canonicalization of all the - /// types in the system, all the types which propagated canonical - /// type has been cleared must be canonicalized. - /// - /// @param t the type to - void - clear_propagated_canonical_type(const type_base *t) - { - if (t->priv_->clear_propagated_canonical_type()) - { -#ifdef WITH_DEBUG_CT_PROPAGATION - // let the book-keeping system know that t has its propagated - // canonical type cleared. - record_type_with_cleared_propagated_canonical_type(t) -#endif - ; - } - } - - /// Add a given type to the set of types that have been - /// non-confirmed subjects of the canonical type propagation - /// optimization. - /// - /// @param t the dependant type to consider. - void - add_to_types_with_non_confirmed_propagated_ct(const type_base *t) - { - uintptr_t v = reinterpret_cast(t); - types_with_non_confirmed_propagated_ct_.insert(v); - } - - /// Remove a given type from the set of types that have been - /// non-confirmed subjects of the canonical type propagation - /// optimization. - /// - /// @param dependant the dependant type to consider. - void - remove_from_types_with_non_confirmed_propagated_ct(const type_base* dependant) - { - uintptr_t i = reinterpret_cast(dependant); - types_with_non_confirmed_propagated_ct_.erase(i); - } - - /// Cancel the propagated canonical types of all the types which - /// propagated canonical type have not yet been confirmed. - void - cancel_all_non_confirmed_propagated_canonical_types() - { - vector to_erase; - for (auto i : types_with_non_confirmed_propagated_ct_) - to_erase.push_back(i); - - for (auto i : to_erase) - { - type_base *t = reinterpret_cast(i); - cancel_ct_propagation(t); - } - } - #ifdef WITH_DEBUG_SELF_COMPARISON const unordered_map& @@ -2102,18 +1481,6 @@ canonicalize_types(const input_iterator& begin, canonicalize(deref(t)); } - -#ifdef WITH_DEBUG_CT_PROPAGATION - // Then now, make sure that all types -- which propagated canonical - // type has been cleared -- have been canonicalized. In other - // words, the set of types which have been recorded because their - // propagated canonical type has been cleared must be empty. - const environment& env = deref(begin)->get_environment(); - pointer_set to_canonicalize = - env.priv_->types_with_cleared_propagated_ct(); - - ABG_ASSERT(to_canonicalize.empty()); -#endif // WITH_DEBUG_CT_PROPAGATION } /// Hash and canonicalize a sequence of types. diff --git a/src/abg-ir.cc b/src/abg-ir.cc index 5eb9f304..bdb110cd 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -297,8 +297,6 @@ void pop_composite_type_comparison_operands(const type_base& left, const type_base& right); -bool -mark_dependant_types_compared_until(const type_base &r); /// Push a pair of operands on the stack of operands of the current /// type comparison, during type canonicalization. @@ -338,71 +336,6 @@ pop_composite_type_comparison_operands(const type_base& left, env.priv_->pop_composite_type_comparison_operands(&left, &right); } -/// In the stack of the current types being compared (as part of type -/// canonicalization), mark all the types that comes after a certain -/// one as NOT being eligible to the canonical type propagation -/// optimization. -/// -/// For a starter, please read about the @ref -/// OnTheFlyCanonicalization, aka, "canonical type propagation -/// optimization". -/// -/// To implement that optimization, we need, among other things to -/// maintain stack of the types (and their sub-types) being -/// currently compared as part of type canonicalization. -/// -/// Note that we only consider the type that is the right-hand-side -/// operand of the comparison because it's that one that is being -/// canonicalized and thus, that is not yet canonicalized. -/// -/// The reason why a type is deemed NON-eligible to the canonical -/// type propagation optimization is that it "depends" on -/// recursively present type. Let me explain. -/// -/// Suppose we have a type T that has sub-types named ST0 and ST1. -/// Suppose ST1 itself has a sub-type that is T itself. In this -/// case, we say that T is a recursive type, because it has T -/// (itself) as one of its sub-types: -/// -/// T -/// +-- ST0 -/// | -/// +-- ST1 -/// + -/// | -/// +-- T -/// -/// ST1 is said to "depend" on T because it has T as a sub-type. -/// But because T is recursive, then ST1 is said to depend on a -/// recursive type. Notice however that ST0 does not depend on any -/// recursive type. -/// -/// When we are at the point of comparing the sub-type T of ST1 -/// against its counterpart, the stack of the right-hand-side -/// operands of the type canonicalization is going to look like -/// this: -/// -/// | T | ST1 | -/// -/// We don't add the type T to the stack as we detect that T was -/// already in there (recursive cycle). -/// -/// So, this function will basically mark ST1 as being NON-eligible -/// to being the target of canonical type propagation, by marking ST1 -/// as being dependant on T. -/// -/// @param right the right-hand-side operand of the type comparison. -/// -/// @return true iff the operation was successful. -bool -mark_dependant_types_compared_until(const type_base &r) -{ - const environment& env = r.get_environment(); - if (env.do_on_the_fly_canonicalization()) - return env.priv_->mark_dependant_types_compared_until(&r); - return false; -} - /// Getter of the canonical type index of a given type. /// /// @param t the type to consider. @@ -1037,10 +970,7 @@ is_comparison_cycle_detected(const class_decl& l, const class_decl& r) do \ { \ if (is_comparison_cycle_detected(l, r)) \ - { \ - mark_dependant_types_compared_until(r); \ - return true; \ - } \ + return true; \ } \ while(false) @@ -1121,111 +1051,20 @@ unmark_types_as_being_compared(const class_decl& l, const class_decl &r) /// The function does the necessary book keeping before returning the /// result of the comparison of two (sub) types. /// -/// The book-keeping done is in the following -/// areas: -/// -/// * Management of the Canonical Type Propagation optimization -/// * type comparison cycle detection +/// The book-keeping done is essentially about type comparison cycle detection. /// /// @param l the left-hand-side operand of the type comparison /// /// @param r the right-hand-side operand of the type comparison /// -/// @param propagate_canonical_type if true, it means the function -/// performs the @ref OnTheFlyCanonicalization, aka, "canonical type -/// propagation optimization". -/// /// @param value the result of the comparison of @p l and @p r. /// /// @return the value @p value. template bool -return_comparison_result(T& l, T& r, bool value, - bool propagate_canonical_type = true) +return_comparison_result(T& l, T& r, bool value) { - if (propagate_canonical_type && (value == true)) - maybe_propagate_canonical_type(l, r); - unmark_types_as_being_compared(l, r); - - const environment& env = l.get_environment(); - if (env.do_on_the_fly_canonicalization()) - // We are instructed to perform the "canonical type propagation" - // optimization, making 'r' to possibly get the canonical type of - // 'l' if it has one. This mostly means that we are currently - // canonicalizing the type that contain the subtype provided in - // the 'r' argument. - { - if (value == true - && (is_type(&r)->priv_->depends_on_recursive_type() - || env.priv_->is_recursive_type(&r)) - && is_type(&r)->priv_->canonical_type_propagated() - && !is_type(&r)->priv_->propagated_canonical_type_confirmed() - && !env.priv_->right_type_comp_operands_.empty()) - { - // Track the object 'r' for which the propagated canonical - // type might be re-initialized if the current comparison - // eventually fails. - env.priv_->add_to_types_with_non_confirmed_propagated_ct(is_type(&r)); - } - else if (value == true - && env.priv_->right_type_comp_operands_.empty() - && is_type(&r)->priv_->canonical_type_propagated() - && !is_type(&r)->priv_->propagated_canonical_type_confirmed()) - { - // The type provided in the 'r' argument is the type that is - // being canonicalized; 'r' is not a mere subtype being - // compared, it's the whole type being canonicalized. And - // its canonicalization has just succeeded. - // - // Let's confirm the canonical type resulting from the - // "canonical type propagation" optimization. - env.priv_->confirm_ct_propagation(&r); - } - else if (value == true - && is_type(&r)->priv_->canonical_type_propagated() - && !is_type(&r)->priv_->propagated_canonical_type_confirmed()) - // In any other case, we are not sure if propagated types - // should be confirmed yet. So let's mark them as such. - env.priv_->add_to_types_with_non_confirmed_propagated_ct(is_type(&r)); - else if (value == false) - { - // The comparison of the current sub-type failed. So all - // the with non-confirmed propagated types (those in - // env.prix_->types_with_non_confirmed_propagated_ct_) - // should see their tentatively propagated canonical type - // cancelled. - env.priv_->cancel_all_non_confirmed_propagated_canonical_types(); - } - } - - // If we reached this point with value == true and the stack of - // types being compared is empty, then it means that the type pair - // that was at the bottom of the stack is now fully compared. - // - // It follows that all types that were target of canonical type - // propagation can now see their tentative canonical type be - // confirmed for real. - if (value == true - && env.priv_->right_type_comp_operands_.empty() - && !env.priv_->types_with_non_confirmed_propagated_ct_.empty()) - // So the comparison is completely done and there are some - // types for which their propagated canonical type is sitll - // considered not confirmed. As the comparison did yield true, we - // shall now confirm the propagation for all those types. - env.priv_->confirm_ct_propagation(); - -#ifdef WITH_DEBUG_SELF_COMPARISON - if (value == false && env.priv_->right_type_comp_operands_.empty()) - { - for (const auto i : env.priv_->types_with_non_confirmed_propagated_ct_) - { - type_base *t = reinterpret_cast(i); - env.priv_->check_abixml_canonical_type_propagation_during_self_comp(t); - } - } -#endif - ABG_RETURN(value); } @@ -3499,24 +3338,6 @@ void environment::canonicalization_is_done(bool f) {priv_->canonicalization_is_done_ = f;} -/// Getter for the "on-the-fly-canonicalization" flag. -/// -/// @return true iff @ref OnTheFlyCanonicalization -/// "on-the-fly-canonicalization" is to be performed during -/// comparison. -bool -environment::do_on_the_fly_canonicalization() const -{return priv_->do_on_the_fly_canonicalization_;} - -/// Setter for the "on-the-fly-canonicalization" flag. -/// -/// @param f If this is true then @ref OnTheFlyCanonicalization -/// "on-the-fly-canonicalization" is to be performed during -/// comparison. -void -environment::do_on_the_fly_canonicalization(bool f) -{priv_->do_on_the_fly_canonicalization_ = f;} - /// Getter of the "decl-only-class-equals-definition" flag. /// /// Usually, a declaration-only class named 'struct foo' compares @@ -15100,10 +14921,6 @@ global_scope::~global_scope() { } -static bool -maybe_propagate_canonical_type(const type_base& lhs_type, - const type_base& rhs_type); - /// Test if two types are eligible to the "Linux Kernel Fast Type /// Comparison Optimization", a.k.a LKFTCO. /// @@ -15313,11 +15130,7 @@ compare_canonical_type_against_candidate(const type_base& canonical_type, // resolved to any of the two definitions of struct S. bool saved_decl_only_class_equals_definition = env.decl_only_class_equals_definition(); - // Now that we do hash types and use the hash in comparisons, we - // don't do canonical-type-propagation anymore, at least for now. - // Let's see how we fare in terms of performance and hope we don't - // need this optimization moving foward. - env.do_on_the_fly_canonicalization(false); + // Compare types by considering that decl-only classes don't // equal their definition. env.decl_only_class_equals_definition(false); @@ -15331,7 +15144,6 @@ compare_canonical_type_against_candidate(const type_base& canonical_type, // flags. env.priv_->clear_type_comparison_results_cache(); env.priv_->allow_type_comparison_results_caching(false); - env.do_on_the_fly_canonicalization(false); env.decl_only_class_equals_definition (saved_decl_only_class_equals_definition); return equal; @@ -15884,21 +15696,6 @@ canonicalize(type_base_sptr t, bool do_log, bool show_stats) if (!t->priv_->canonical_type_index) t->priv_->canonical_type_index = canonical->priv_->canonical_type_index; - // So this type is now canonicalized. - // - // It means that: - // - // 1/ Either the canonical type was not propagated during the - // comparison of another type that was being canonicalized - // - // 2/ Or the canonical type has been propagated during the - // comparison of another type that was being canonicalized and - // that propagated canonical type has been confirmed, because - // it was depending on a recursive type which comparison - // succeeded. - ABG_ASSERT(!t->priv_->canonical_type_propagated() - || t->priv_->propagated_canonical_type_confirmed()); - if (class_decl_sptr cl = is_class_type(t)) if (type_base_sptr d = is_type(cl->get_earlier_declaration())) if ((canonical = d->get_canonical_type())) @@ -15934,18 +15731,6 @@ canonicalize(type_base_sptr t, bool do_log, bool show_stats) // emitted. This can be the case for the result of the // function strip_typedef, for instance. } - -#ifdef WITH_DEBUG_CT_PROPAGATION - // Update the book-keeping of the set of the types which - // propagated canonical type has been cleared. - // - // If this type 't' which has just been canonicalized was - // previously in the set of types which propagated canonical - // type has been cleared, then remove it from that set because - // its canonical type is now computed and definitely set. - const environment& env = t->get_environment(); - env.priv_->erase_type_with_cleared_propagated_canonical_type(t.get()); -#endif } t->on_canonical_type_set(); @@ -24211,9 +23996,8 @@ equals(const class_or_union& l, const class_or_union& r, change_kind* k) //overload for class_decl and union_decl because this one ( the //equal overload for class_or_union) is just a sub-routine of these //two above. -#define RETURN(value) \ - return return_comparison_result(l, r, value, \ - /*propagate_canonical_type=*/false); +#define RETURN(value) \ + return return_comparison_result(l, r, value); RETURN_TRUE_IF_COMPARISON_CYCLE_DETECTED(l, r); @@ -24398,135 +24182,6 @@ copy_member_function(const class_or_union_sptr& t, const method_decl* method) // -/// @defgroup OnTheFlyCanonicalization On-the-fly Canonicalization -/// @{ -/// -/// This optimization is also known as "canonical type propagation". -/// -/// During the canonicalization of a type T (which doesn't yet have a -/// canonical type), T is compared structurally (member-wise) against -/// a type C which already has a canonical type. The comparison -/// expression is C == T. -/// -/// During that structural comparison, if a subtype of C (which also -/// already has a canonical type) is structurally compared to a -/// subtype of T (which doesn't yet have a canonical type) and if they -/// are equal, then we can deduce that the canonical type of the -/// subtype of C is the canonical type of the subtype of C. -/// -/// Thus, we can canonicalize the sub-type of the T, during the -/// canonicalization of T itself. That canonicalization of the -/// sub-type of T is what we call the "on-the-fly canonicalization". -/// It's on the fly because it happens during a comparison -- which -/// itself happens during the canonicalization of T. -/// -/// For now this on-the-fly canonicalization only happens when -/// comparing @ref class_decl and @ref function_type. -/// -/// Note however that there is a case when a type is *NOT* eligible to -/// this canonical type propagation optimization. -/// -/// The reason why a type is deemed NON-eligible to the canonical type -/// propagation optimization is that it "depends" on recursively -/// present type. Let me explain. -/// -/// Suppose we have a type T that has sub-types named ST0 and ST1. -/// Suppose ST1 itself has a sub-type that is T itself. In this case, -/// we say that T is a recursive type, because it has T (itself) as -/// one of its sub-types: -/// -///
-///    T
-///    +-- ST0
-///    |
-///    +-- ST1
-///    |    +
-///    |    |
-///    |    +-- T
-///    |
-///    +-- ST2
-/// 
-/// -/// ST1 is said to "depend" on T because it has T as a sub-type. But -/// because T is recursive, then ST1 is said to depend on a recursive -/// type. Notice however that ST0 does not depend on any recursive -/// type. -/// -/// Now suppose we are comparing T to a type T' that has the same -/// structure with sub-types ST0', ST1' and ST2'. During the -/// comparison of ST1 against ST1', their sub-type T is compared -/// against T'. Because T (resp. T') is a recursive type that is -/// already being compared, the comparison of T against T' (as a -/// subtypes of ST1 and ST1') returns true, meaning they are -/// considered equal. This is done so that we don't enter an infinite -/// recursion. -/// -/// That means ST1 is also deemed equal to ST1'. If we are in the -/// course of the canonicalization of T' and thus if T (as well as as -/// all of its sub-types) is already canonicalized, then the canonical -/// type propagation optimization will make us propagate the canonical -/// type of ST1 onto ST1'. So the canonical type of ST1' will be -/// equal to the canonical type of ST1 as a result of that -/// optmization. -/// -/// But then, later down the road, when ST2 is compared against ST2', -/// let's suppose that we find out that they are different. Meaning -/// that ST2 != ST2'. This means that T != T', i.e, the -/// canonicalization of T' failed for now. But most importantly, it -/// means that the propagation of the canonical type of ST1 to ST1' -/// must now be invalidated. Meaning, ST1' must now be considered as -/// not having any canonical type. -/// -/// In other words, during type canonicalization, if ST1' depends on a -/// recursive type T', its propagated canonical type must be -/// invalidated (set to nullptr) if T' appears to be different from T, -/// a.k.a, the canonicalization of T' temporarily failed. -/// -/// This means that any sub-type that depends on recursive types and -/// that has been the target of the canonical type propagation -/// optimization must be tracked. If the dependant recursive type -/// fails its canonicalization, then the sub-type being compared must -/// have its propagated canonical type cleared. In other words, its -/// propagated canonical type must be cancelled. -/// -/// @} - - -/// If on-the-fly canonicalization is turned on, then this function -/// sets the canonical type of its second parameter to the canonical -/// type of the first parameter. -/// -/// @param lhs_type the type which canonical type to propagate. -/// -/// @param rhs_type the type which canonical type to set. -static bool -maybe_propagate_canonical_type(const type_base& lhs_type, - const type_base& rhs_type) -{ - const environment& env = lhs_type.get_environment(); -#if WITH_DEBUG_TYPE_CANONICALIZATION - if (!env.priv_->use_canonical_type_comparison_) - return false; -#endif - - if (env.do_on_the_fly_canonicalization()) - if (type_base_sptr canonical_type = lhs_type.get_canonical_type()) - if (!rhs_type.get_canonical_type() - && (!rhs_type.priv_->canonical_type_index - || (rhs_type.priv_->canonical_type_index - == canonical_type->priv_->canonical_type_index))) - { -#if WITH_DEBUG_CT_PROPAGATION - ABG_ASSERT(!rhs_type.priv_->canonical_type_index - || (rhs_type.priv_->canonical_type_index - == canonical_type->priv_->canonical_type_index)); -#endif - if (env.priv_->propagate_ct(lhs_type, rhs_type)) - return true; - } - return false; -} - // static void @@ -25716,29 +25371,6 @@ method_matches_at_least_one_in_vector(const method_decl_sptr& method, return false; } -/// Cancel the canonical type that was propagated. -/// -/// If we are in the process of comparing a type for the purpose of -/// canonicalization, and if that type has been the target of the -/// canonical type propagation optimization, then clear the propagated -/// canonical type. See @ref OnTheFlyCanonicalization for more about -/// the canonical type optimization -/// -/// @param t the type to consider. -static bool -maybe_cancel_propagated_canonical_type(const class_or_union& t) -{ - const environment& env = t.get_environment(); - if (env.do_on_the_fly_canonicalization()) - if (is_type(&t)->priv_->canonical_type_propagated()) - { - is_type(&t)->priv_->clear_propagated_canonical_type(); - env.priv_->remove_from_types_with_non_confirmed_propagated_ct(&t); - return true; - } - return false; -} - /// Compares two instances of @ref class_decl. /// /// If the two intances are different, set a bitfield to give some @@ -25778,7 +25410,6 @@ equals(const class_decl& l, const class_decl& r, change_kind* k) static_cast(r), k)); - bool had_canonical_type = !!r.get_naked_canonical_type(); bool result = true; if (!equals(static_cast(l), static_cast(r), @@ -25789,13 +25420,6 @@ equals(const class_decl& l, const class_decl& r, change_kind* k) ABG_RETURN(result); } - // If comparing the class_or_union 'part' of the type led to - // canonical type propagation, then cancel that because it's too - // early to do that at this point. We still need to compare bases - // virtual members. - if (!had_canonical_type) - maybe_cancel_propagated_canonical_type(r); - RETURN_TRUE_IF_COMPARISON_CYCLE_DETECTED(l, r); mark_types_as_being_compared(l, r); From patchwork Thu Aug 29 15:55:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 96706 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 13E65385EC28 for ; Thu, 29 Aug 2024 15:55:38 +0000 (GMT) X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 33BC93858402 for ; Thu, 29 Aug 2024 15:55:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 33BC93858402 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 33BC93858402 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724946931; cv=none; b=d+13fyL3Zup65F7XvOIB9PmikG2OqGTetF77nseLeO7WPGbFScv0wemSgmMtSRDwaSjn89E+KkOjFOXv7YFL6E3ohW2D7h6HFFGRqr2aUeE685pP/HsJeJpUPirU9KIP78HWBD8qZZJE8pkfgB+j0ycU8JAIjTSysCMH7Gk/jKs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724946931; c=relaxed/simple; bh=C1dJ9lAH6g7nIt3VrFJfOGKXBErb+vpPUJMSVJVIEr4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=H8ejqfvoPDwdDiepacQyHcT3grv7JhB5my799aC1DehJTPfgK14zB8AgoPzTnSXf5D1JlFRpOrBkjse57zDYcOiq0OFAnKeyz1PE16veQCVQL3Gs0HvioUjRMIoLLHFwd9YII2+iXD76YEn0VoqDinUth/WTPhVBeXK5kTmuPsw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724946929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9eBljxhZ+pMPlXNnZg81Zr7zffHfG78JYjk3ROr9wrs=; b=fSnxVjWOodsCy/QXgUWMI5pIbk/9R+4rYKDdVqrYj4Tb7gsjblyPYRZxSTonIVWC6fkK+d JtcFKSrkZIzoZMpnmoO11czAHRHEatq6258xPug9gtn1m/c1QEhlLl9WbV+8RFo04c3xl2 b0A+aU7PgZJF1BXWprMqs3Q7xO5vaAI= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-135-Yppc0fSKMTm5yvCOlwetug-1; Thu, 29 Aug 2024 11:55:28 -0400 X-MC-Unique: Yppc0fSKMTm5yvCOlwetug-1 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-6bf6a0c2f1eso10421196d6.3 for ; Thu, 29 Aug 2024 08:55:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724946928; x=1725551728; h=mime-version:user-agent:message-id:in-reply-to:date:references :organization:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9eBljxhZ+pMPlXNnZg81Zr7zffHfG78JYjk3ROr9wrs=; b=Dfl9tgoiOmam96vV9WIklxs1J+UlkOVNvKWMEqz0CVMIjGhi0MggI1/OSLVSHQUx0E VDoO5hVj3qM8DSIxb82P+L5Att/YpD7GM8juxqNNFEFJSF6G43WTiPJUKcHzX8lLSyEN bQbe/rztQdPUiSYAdC8GSlxWl7oFe4qRu66Cc4nvYqMEAuxywwLE717feHcAT8bodni/ gpq4a2QGjU2jxqGQ2biYfbCEXUtzOFiAuUJjnF77C9VRitql0I90fGaoI1NLoaWOwgbD ZSl/eDUOo8fWVuvXmfBxTvej2y2iEZTcluxJr1z/57k7T9W9es7ULEgLVl0FLJL9nEFv 5Cdw== X-Gm-Message-State: AOJu0YyS1kozQVx7oWcArpBoA3r1uj5COGJnr0cwjbzzK9z+YOFIFsoi 5H3l4op7rsjWMGVgrkeT2XxZ79B2qVaDbJagQQi8lYgFkapfpTpuWmkuqYAFNKWJONmahmqZeVb 2bbwg9zoG8ZBl+z3j6sQ+jumAl8XxS72ib8C9r+cd8WJWIhzhhYbzJ/oJh8zaUny2bw== X-Received: by 2002:a0c:fec9:0:b0:6c3:3f31:281f with SMTP id 6a1803df08f44-6c33f31289fmr29972726d6.36.1724946928024; Thu, 29 Aug 2024 08:55:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHSbN4MVh6mVAvBsR2w9Efuux+1qOjd/9+A1/o8tOB42MCF+wWIEY96nLqwvY90P0O7YgZRJg== X-Received: by 2002:a0c:fec9:0:b0:6c3:3f31:281f with SMTP id 6a1803df08f44-6c33f31289fmr29972576d6.36.1724946927682; Thu, 29 Aug 2024 08:55:27 -0700 (PDT) Received: from localhost (88-120-130-27.subs.proxad.net. [88.120.130.27]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6c340c01625sm6291546d6.48.2024.08.29.08.55.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 08:55:27 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id AB472503C602; Thu, 29 Aug 2024 17:55:25 +0200 (CEST) From: Dodji Seketeli To: dodji@redhat.com Cc: libabigail@sourceware.org Subject: [PATCH 03/27] ir: decl-only classes don't equal fully defined classes under ODR Organization: Me, myself and I References: <20240829154711.1883174-1-dodji@redhat.com> X-Operating-System: AlmaLinux 9.4 X-URL: http://www.seketeli.net/~dodji Date: Thu, 29 Aug 2024 17:55:25 +0200 In-Reply-To: <20240829154711.1883174-1-dodji@redhat.com> (dodji@redhat.com's message of "Thu, 29 Aug 2024 17:46:29 +0200") Message-ID: <87wmjzmihe.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libabigail-bounces~patchwork=sourceware.org@sourceware.org Hello, Until now, when the One Definition Rule is in effect (when analyzing C++, for instance) we assume that a decl-only class equals all the fully-defined classes of the same name. Now that we are using type hashing to determine type equality during type canonicalization, we cannot keep that assumption, because the hash of a decl-only class does not necessarily equals the hash of its definition. Actually, decl-only classes don't have hashes. So this patch removes that assumption. Note that even with this patch, "make check" still yields 3 failures that are still XFAILed in the test suite. * src/abg-ir.cc (equals): In language supporting the ODR (just like in all other languages), consider that a decl-only class is different from its defined class counterpart. * tests/data/test-diff-dwarf/test28-vtable-changes-report-0.txt: Adjust. * tests/data/test-diff-filter/test41-report-0.txt: Likewise. Signed-off-by: Dodji Seketeli --- src/abg-ir.cc | 4 +--- tests/data/test-diff-dwarf/test28-vtable-changes-report-0.txt | 3 +++ tests/data/test-diff-filter/test41-report-0.txt | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/abg-ir.cc b/src/abg-ir.cc index bdb110cd..826dea4c 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -23920,9 +23920,7 @@ equals(const class_or_union& l, const class_or_union& r, change_kind* k) // change. return true; - if ((l.get_environment().decl_only_class_equals_definition() - || ((odr_is_relevant(l) && !def1) - || (odr_is_relevant(r) && !def2))) + if (l.get_environment().decl_only_class_equals_definition() && !is_anonymous_or_typedef_named(l) && !is_anonymous_or_typedef_named(r)) { diff --git a/tests/data/test-diff-dwarf/test28-vtable-changes-report-0.txt b/tests/data/test-diff-dwarf/test28-vtable-changes-report-0.txt index 6076c92b..d64a87b1 100644 --- a/tests/data/test-diff-dwarf/test28-vtable-changes-report-0.txt +++ b/tests/data/test-diff-dwarf/test28-vtable-changes-report-0.txt @@ -15,6 +15,9 @@ Variable symbols changes summary: 0 Removed, 3 Added variable symbols not refere [C] 'method void S::bar()' has some indirect sub-type changes: method void S::bar() is now declared virtual note that this is an ABI incompatible change to the vtable of struct S + implicit parameter 0 of type 'S*' has sub-type changes: + in pointed to type 'struct S': + type struct S was a declaration-only type and is now a defined type 3 Added variable symbols not referenced by debug info: diff --git a/tests/data/test-diff-filter/test41-report-0.txt b/tests/data/test-diff-filter/test41-report-0.txt index faffbbc1..d5c7f181 100644 --- a/tests/data/test-diff-filter/test41-report-0.txt +++ b/tests/data/test-diff-filter/test41-report-0.txt @@ -1,4 +1,4 @@ -Functions changes summary: 8 Removed, 4 Changed (6 filtered out), 16 Added functions +Functions changes summary: 8 Removed, 4 Changed (7 filtered out), 16 Added functions Variables changes summary: 0 Removed, 0 Changed, 0 Added variable Function symbols changes summary: 1 Removed, 0 Added function symbol not referenced by debug info Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info @@ -52,7 +52,7 @@ Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen in pointed to type 'const abigail::xml_writer::write_context': in unqualified underlying type 'class abigail::xml_writer::write_context' at abg-writer.cc:155:1: type size hasn't changed - 5 data member changes (4 filtered): + 5 data member changes (7 filtered): type of 'abigail::config m_config' changed: type size hasn't changed no data member changes (4 filtered); From patchwork Thu Aug 29 15:56:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 96707 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8A39C385E027 for ; Thu, 29 Aug 2024 15:56:29 +0000 (GMT) X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 94CAD385EC25 for ; Thu, 29 Aug 2024 15:56:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 94CAD385EC25 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 94CAD385EC25 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724946984; cv=none; b=VBXMlA70CMkzys2UNNVXmYPjQCXjCWa52pcEnKygAncKGA5bGQNS4IL8/nwjcSRXJs/ffx8mTIaBTeNwkbSnZk6ooMjhXUnQ0eWbC17vKR6ZVRFSX01vgeOT6jHP877B4PfetywFKVJc5BR2kz2D0X0bP/BzzVlYqfqjWF9k83w= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724946984; c=relaxed/simple; bh=fH8NEwP49Zx9oX+ZR88ijtXsj+xo/BIrJAxmoVAcTss=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=w77Agcffjdx7GJCJwWgJe8P5kr6helequ3/wNqH55v7uM1ZzW/X7WSGmIu2HnkyEIuarv+i0VIfsuUf3ISG2wujVu2D+bsoUAHPEoxdf14/4xSYtt9neNFGfaNC2xgPThx1rDaxSPGRAsEtylvyIuqUKLzbrMizA+h7uzG0WAbM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724946979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=d/fQI8tIg9F3gB+nntXMdTdUZc/7lyS0ZyeTcz7Lyl8=; b=J0JscBi6OlNn/uMMpuJ2+MakGbiqLbZcFDvD2XjG0bAZ4jzZi2pwhpvHQIvDzcn8wIWxir 6iS0eMXIlqf3EreJXwcboMP77y/nHQsrJxOcdoVzLkCWrw8HVQ1b+p/P5I5GMPdO/K0i5G EDMN1Q8oZpvLfK6KxdxEzpi1lpMoTJE= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-459-LEhJghTANkeYRi4JlPEgPg-1; Thu, 29 Aug 2024 11:56:17 -0400 X-MC-Unique: LEhJghTANkeYRi4JlPEgPg-1 Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-7a8084eb116so106637685a.1 for ; Thu, 29 Aug 2024 08:56:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724946977; x=1725551777; h=mime-version:user-agent:message-id:in-reply-to:date:references :organization:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d/fQI8tIg9F3gB+nntXMdTdUZc/7lyS0ZyeTcz7Lyl8=; b=gudLHqd4pfJMW69HZeqQFA2bssVftm6yxFMxtVKvqxuyFMlzRgFmK0jQCXdTOt5rHt zkyiY/P4DE9vKnMFXgjy7ivux3YXEj41aDhs7mmM5NcuUbfGcQTJJOvTkCUqgUppUKyQ RXWKe9bNSLxa1+TVdtrXHxbnKrwu4OjH09eI4i78/Ldzi+PGGXXp1sqliwZ8+OXkekQy 93BCqaZn2/kgpHbM7ECmVFDMtyDOdujGa+ZPAZKVuAXVr6CfGvffhluzSNjSjgEltv8t OUkXeDfAZbERCCcVpiVpp52A4InuoRtXoUIyJfGlYfazw3vy9rUAxnSLB0+0rYlYsCGv 5CIg== X-Gm-Message-State: AOJu0Yyb4+hksIq+VfGQ/KxiEOcX1XsOMt4a/7Tv7E7dKh+vIH7eQFNf SvVSlh+BDAHleYfQ/oo2abUKUY2qCeIpLHZlCkx3ZxaEmjURNRzzCvRzmjeVdDRELEHt0wzSuB8 qLyKfFlQLxu7dNrYbBkMwb984MCnFZQ832TyWKIrqxh1VpePbyifQbJix9svCgwoixQ== X-Received: by 2002:a05:620a:280c:b0:7a2:e53:3f67 with SMTP id af79cd13be357-7a8041ac9f6mr374017885a.19.1724946976622; Thu, 29 Aug 2024 08:56:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG1d+CDPkqquYPpr7VdwCTrXtUKKFTn0b+xHJtffYBW1rqvOeDL5pgd9ygNfjhnMAFlyHYvNw== X-Received: by 2002:a05:620a:280c:b0:7a2:e53:3f67 with SMTP id af79cd13be357-7a8041ac9f6mr374015285a.19.1724946976018; Thu, 29 Aug 2024 08:56:16 -0700 (PDT) Received: from localhost (88-120-130-27.subs.proxad.net. [88.120.130.27]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a806d61c77sm62083985a.109.2024.08.29.08.56.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 08:56:15 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id 1388E503C602; Thu, 29 Aug 2024 17:56:14 +0200 (CEST) From: Dodji Seketeli To: dodji@redhat.com Cc: libabigail@sourceware.org Subject: [PATCH 04/27] comp-filter: Consider lvalue-ness changes on references as harmful Organization: Me, myself and I References: <20240829154711.1883174-1-dodji@redhat.com> X-Operating-System: AlmaLinux 9.4 X-URL: http://www.seketeli.net/~dodji Date: Thu, 29 Aug 2024 17:56:14 +0200 In-Reply-To: <20240829154711.1883174-1-dodji@redhat.com> (dodji@redhat.com's message of "Thu, 29 Aug 2024 17:46:29 +0200") Message-ID: <87seunmig1.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libabigail-bounces~patchwork=sourceware.org@sourceware.org Hello, This patch detects an lvalue-ness change on a reference type, categorizes it as REFERENCE_LVALUENESS_CHANGE_CATEGORY and considers it as harmful by default. Note that this patch fixes the parts of runtestdifffilter that have to do with lvalue-ness changes to reference types, but there is still one test failing from the testsuite: runtestabidiffexit. This test has been XFAILed in the test suite. * include/abg-comparison.h (enum diff_category): Add the new REFERENCE_LVALUENESS_CHANGE_CATEGORY enumerator. Adjust the value of the other enumerators. * src/abg-comparison.cc (get_default_harmful_categories_bitmap): Consider the new REFERENCE_LVALUENESS_CHANGE_CATEGORY as being part of the default harmful categories bitmap. (operator<<(ostream& o, diff_category c)): Support the new REFERENCE_LVALUENESS_CHANGE_CATEGORY for me. * include/abg-comp-filter.h (has_lvalue_reference_ness_change): Declare new function. * src/abg-comp-filter.cc (has_lvalue_reference_ness_change): Define new function. (categorize_harmful_diff_node): Use the new has_lvalue_reference_ness_change to set the new REFERENCE_LVALUENESS_CHANGE_CATEGORY. * tests/Makefile.am: XFAIL runtestabidiffexit. * tests/data/test-diff-filter/test3-report.txt: Adjust. * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Likewise. * tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt: Likewise. * tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt: Likewise. * tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt: Likewise. * tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-1.txt: Likewise. * tests/data/test-diff-filter/test47-filter-void-ptr-change-report-0.txt: Likewise. Signed-off-by: Dodji Seketeli --- include/abg-comp-filter.h | 3 +++ include/abg-comparison.h | 27 ++++++++++--------- src/abg-comp-filter.cc | 23 ++++++++++++++++ src/abg-comparison.cc | 9 +++++++ src/abg-ir.cc | 10 ------- tests/Makefile.am | 2 +- .../test30-pr18904-rvalueref-report0.txt | 10 ++++--- .../test30-pr18904-rvalueref-report1.txt | 10 ++++--- .../test30-pr18904-rvalueref-report2.txt | 10 ++++--- .../test35-pr18754-no-added-syms-report-0.txt | 10 ++++--- .../test35-pr18754-no-added-syms-report-1.txt | 2 +- .../data/test-diff-filter/test41-report-0.txt | 8 ++---- ...test47-filter-void-ptr-change-report-0.txt | 26 ++++++++++++++++++ tests/data/test-diff-filter/test7-report.txt | 1 - 14 files changed, 108 insertions(+), 43 deletions(-) diff --git a/include/abg-comp-filter.h b/include/abg-comp-filter.h index bf79fe17..6eb6fee2 100644 --- a/include/abg-comp-filter.h +++ b/include/abg-comp-filter.h @@ -105,6 +105,9 @@ has_strict_fam_conversion(const class_decl_sptr& first, bool has_strict_fam_conversion(const diff *d); +bool +has_lvalue_reference_ness_change(const diff *d); + struct filter_base; /// Convenience typedef for a shared pointer to filter_base typedef shared_ptr filter_base_sptr; diff --git a/include/abg-comparison.h b/include/abg-comparison.h index b0527e79..fcf20581 100644 --- a/include/abg-comparison.h +++ b/include/abg-comparison.h @@ -382,61 +382,63 @@ enum diff_category /// incompatible change to a vtable. VIRTUAL_MEMBER_CHANGE_CATEGORY = 1 << 12, + REFERENCE_LVALUENESS_CHANGE_CATEGORY = 1 << 13, + /// A diff node in this category is redundant. That means it's /// present as a child of a other nodes in the diff tree. - REDUNDANT_CATEGORY = 1 << 13, + REDUNDANT_CATEGORY = 1 << 14, /// This means that a diff node in the sub-tree carries a type that /// was declaration-only and that is now defined, or vice versa. - TYPE_DECL_ONLY_DEF_CHANGE_CATEGORY = 1 << 14, + TYPE_DECL_ONLY_DEF_CHANGE_CATEGORY = 1 << 15, /// A diff node in this category is a function parameter type which /// top cv-qualifiers change. - FN_PARM_TYPE_TOP_CV_CHANGE_CATEGORY = 1 << 15, + FN_PARM_TYPE_TOP_CV_CHANGE_CATEGORY = 1 << 16, /// A diff node in this category has a function parameter type with a /// cv-qualifiers change. - FN_PARM_TYPE_CV_CHANGE_CATEGORY = 1 << 16, + FN_PARM_TYPE_CV_CHANGE_CATEGORY = 1 << 17, /// A diff node in this category is a function return type with a /// cv-qualifier change. - FN_RETURN_TYPE_CV_CHANGE_CATEGORY = 1 << 17, + FN_RETURN_TYPE_CV_CHANGE_CATEGORY = 1 << 18, /// A diff node in this category is a function (or function type) /// with at least one parameter added or removed. - FN_PARM_ADD_REMOVE_CHANGE_CATEGORY = 1 << 18, + FN_PARM_ADD_REMOVE_CHANGE_CATEGORY = 1 << 19, /// A diff node in this category is for a variable which type holds /// a cv-qualifier change. - VAR_TYPE_CV_CHANGE_CATEGORY = 1 << 19, + VAR_TYPE_CV_CHANGE_CATEGORY = 1 << 20, /// A diff node in this category carries a change from void pointer /// to non-void pointer. - VOID_PTR_TO_PTR_CHANGE_CATEGORY = 1 << 20, + VOID_PTR_TO_PTR_CHANGE_CATEGORY = 1 << 21, /// A diff node in this category carries a change in the size of the /// array type of a global variable, but the ELF size of the /// variable didn't change. - BENIGN_INFINITE_ARRAY_CHANGE_CATEGORY = 1 << 21, + BENIGN_INFINITE_ARRAY_CHANGE_CATEGORY = 1 << 22, /// A diff node in this category carries a change that must be /// reported, even if the diff node is also in the /// SUPPRESSED_CATEGORY or PRIVATE_TYPE_CATEGORY categories. /// Typically, this node matches a suppression specification like /// the [allow_type] directive. - HAS_ALLOWED_CHANGE_CATEGORY = 1 << 22, + HAS_ALLOWED_CHANGE_CATEGORY = 1 << 23, /// A diff node in this category has a descendant node that is in /// the HAS_ALLOWED_CHANGE_CATEGORY category. Nodes in this /// category must be reported, even if they are also in the /// SUPPRESSED_CATEGORY or PRIVATE_TYPE_CATEGORY categories. - HAS_DESCENDANT_WITH_ALLOWED_CHANGE_CATEGORY = 1 << 23, + HAS_DESCENDANT_WITH_ALLOWED_CHANGE_CATEGORY = 1 << 24, /// A diff node in this category has a parent node that is in the /// HAS_ALLOWED_CHANGE_CATEGORY category. Nodes in this category /// must be reported, even if they are also in the /// SUPPRESSED_CATEGORY or PRIVATE_TYPE_CATEGORY categories. - HAS_PARENT_WITH_ALLOWED_CHANGE_CATEGORY = 1 << 24, + HAS_PARENT_WITH_ALLOWED_CHANGE_CATEGORY = 1 << 25, /// A special enumerator that is the logical 'or' all the /// enumerators above. @@ -457,6 +459,7 @@ enum diff_category | PRIVATE_TYPE_CATEGORY | SIZE_OR_OFFSET_CHANGE_CATEGORY | VIRTUAL_MEMBER_CHANGE_CATEGORY + | REFERENCE_LVALUENESS_CHANGE_CATEGORY | REDUNDANT_CATEGORY | TYPE_DECL_ONLY_DEF_CHANGE_CATEGORY | FN_PARM_TYPE_TOP_CV_CHANGE_CATEGORY diff --git a/src/abg-comp-filter.cc b/src/abg-comp-filter.cc index b0ba8a0f..823b5566 100644 --- a/src/abg-comp-filter.cc +++ b/src/abg-comp-filter.cc @@ -1030,6 +1030,26 @@ has_strict_fam_conversion(const diff *dif) d->second_class_decl()); } +/// Test if a diff node carries a change where an lvalue reference +/// changed into a rvalue reference, or vice versa. +/// +/// @param dif the diff node to consider. +/// +/// @return true iff @p dif carries a change where an lvalue reference +/// changed into a rvalue reference, or vice versa. +bool +has_lvalue_reference_ness_change(const diff *dif) +{ + const reference_diff* d = is_reference_diff(dif); + if (!d) + return false; + + if (d->first_reference()->is_lvalue() == d->second_reference()->is_lvalue()) + return false; + + return true; +} + /// Test if a class_diff node has static members added or removed. /// /// @param diff the diff node to consider. @@ -2190,6 +2210,9 @@ categorize_harmful_diff_node(diff *d, bool pre) if (has_virtual_mem_fn_change(d)) category |= VIRTUAL_MEMBER_CHANGE_CATEGORY; + if (has_lvalue_reference_ness_change(d)) + category |= REFERENCE_LVALUENESS_CHANGE_CATEGORY; + if (has_added_or_removed_function_parameters(d)) category |= FN_PARM_ADD_REMOVE_CHANGE_CATEGORY; diff --git a/src/abg-comparison.cc b/src/abg-comparison.cc index 87a2e4a9..ac5398f7 100644 --- a/src/abg-comparison.cc +++ b/src/abg-comparison.cc @@ -3181,6 +3181,7 @@ get_default_harmful_categories_bitmap() { return (abigail::comparison::SIZE_OR_OFFSET_CHANGE_CATEGORY | abigail::comparison::VIRTUAL_MEMBER_CHANGE_CATEGORY + | abigail::comparison::REFERENCE_LVALUENESS_CHANGE_CATEGORY | abigail::comparison::FN_PARM_ADD_REMOVE_CHANGE_CATEGORY); } @@ -3306,6 +3307,14 @@ operator<<(ostream& o, diff_category c) emitted_a_category |= true; } + if (c & REFERENCE_LVALUENESS_CHANGE_CATEGORY) + { + if (emitted_a_category) + o << "|"; + o << "REFERENCE_LVALUENESS_CHANGE_CATEGORY"; + emitted_a_category |= true; + } + if (c & REDUNDANT_CATEGORY) { if (emitted_a_category) diff --git a/src/abg-ir.cc b/src/abg-ir.cc index 826dea4c..d0fafd02 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -17596,16 +17596,6 @@ pointer_type_def::set_pointed_to_type(const type_base_sptr& t) bool equals(const pointer_type_def& l, const pointer_type_def& r, change_kind* k) { - // In C and C++ languages, a pointer to void equals all other - // pointers. - if (l.get_translation_unit() - && r.get_translation_unit() - && is_c_language(l.get_translation_unit()->get_language()) - && is_c_language(r.get_translation_unit()->get_language()) - && (is_void_pointer_type_equivalent(&l) - || is_void_pointer_type_equivalent(&r))) - return true; - bool result = l.get_pointed_to_type() == r.get_pointed_to_type(); if (!result) if (k) diff --git a/tests/Makefile.am b/tests/Makefile.am index 36439895..3cb95fdc 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -75,7 +75,7 @@ endif # are logically not related to the type hashing commit will fix the # issues and as a result, these test will PASS again. For now, let's # mark them as being XFAIL. -XFAIL_TESTS = runtestdifffilter runtestabidiffexit +XFAIL_TESTS = runtestabidiffexit EXTRA_DIST = \ runtestcanonicalizetypes.sh.in \ diff --git a/tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt b/tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt index fd3288ef..b0332be5 100644 --- a/tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt +++ b/tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt @@ -1,4 +1,4 @@ -Functions changes summary: 82 Removed, 6 Changed (33 filtered out), 1081 Added functions +Functions changes summary: 82 Removed, 7 Changed (32 filtered out), 1081 Added functions Variables changes summary: 47 Removed, 1 Changed, 11 Added variables Function symbols changes summary: 7 Removed, 76 Added function symbols not referenced by debug info Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info @@ -1172,7 +1172,7 @@ Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen [A] 'method void std::vector >::vector(Iterator, Iterator, const std::vector >::allocator_type&)' [A] 'method std::vector >::~vector()' -6 functions with some indirect sub-type change: +7 functions with some indirect sub-type change: [C] 'method void Engine::fini_process(bool)' has some indirect sub-type changes: implicit parameter 0 of type 'Engine*' has sub-type changes: @@ -1260,7 +1260,7 @@ Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen type of 'union {struct {uint32_t is_static; uint32_t is_static_dstn; uint32_t has_length; uint32_t is_stack_buf; uint32_t sink_addr; uint32_t alloc_disp; uint32_t is_noncont_src; uint32_t is_noncont_dst;}; uint32_t bits;} flags' changed: type name changed from 'VarDesc::__anonymous_union__2' to 'varDescFlags' type size hasn't changed - 1 data member changes (1 filtered): + 1 data member change: anonymous data member at offset 0 (in bits) changed from: struct {uint32_t is_static; uint32_t is_static_dstn; uint32_t has_length; uint32_t is_stack_buf; uint32_t sink_addr; uint32_t alloc_disp; uint32_t is_noncont_src; uint32_t is_noncont_dst;} to: @@ -1429,6 +1429,10 @@ Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen type name changed from 'void' to 'bool' type size changed from 0 to 8 (in bits) + [C] 'method std::pair, bool> std::_Rb_tree, std::less, std::allocator >::_M_insert_unique(PtrData&&)' has some indirect sub-type changes: + parameter 1 of type 'PtrData&&' changed: + rvalue reference type 'PtrData&& became an lvalue reference type: 'PtrData&' + [C] 'method void std::vector >::_M_emplace_back_aux(const VarTable::Entry*&&)' has some indirect sub-type changes: Please note that the symbol of this function is _ZNSt6vectorIPKN8VarTable5EntryESaIS3_EE19_M_emplace_back_auxIJS3_EEEvDpOT_ and it aliases symbol: _ZNSt6vectorIPKN8VarTable5EntryESaIS3_EE19_M_emplace_back_auxIIS3_EEEvDpOT_ diff --git a/tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt b/tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt index 827ca5c3..b9a226d8 100644 --- a/tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt +++ b/tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt @@ -1,4 +1,4 @@ -Functions changes summary: 82 Removed, 6 Changed (33 filtered out), 1081 Added functions +Functions changes summary: 82 Removed, 7 Changed (32 filtered out), 1081 Added functions Variables changes summary: 47 Removed, 1 Changed, 11 Added variables Function symbols changes summary: 7 Removed, 76 Added function symbols not referenced by debug info Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info @@ -1172,7 +1172,7 @@ Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen [A] 'method void std::vector >::vector(Iterator, Iterator, const std::vector >::allocator_type&)' [A] 'method std::vector >::~vector()' -6 functions with some indirect sub-type change: +7 functions with some indirect sub-type change: [C] 'method void Engine::fini_process(bool)' at offload_engine.cpp:184:1 has some indirect sub-type changes: implicit parameter 0 of type 'Engine*' has sub-type changes: @@ -1260,7 +1260,7 @@ Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen type of 'union {struct {uint32_t is_static; uint32_t is_static_dstn; uint32_t has_length; uint32_t is_stack_buf; uint32_t sink_addr; uint32_t alloc_disp; uint32_t is_noncont_src; uint32_t is_noncont_dst;}; uint32_t bits;} flags' changed: type name changed from 'VarDesc::__anonymous_union__2' to 'varDescFlags' type size hasn't changed - 1 data member changes (1 filtered): + 1 data member change: anonymous data member at offset 0 (in bits) changed from: struct {uint32_t is_static; uint32_t is_static_dstn; uint32_t has_length; uint32_t is_stack_buf; uint32_t sink_addr; uint32_t alloc_disp; uint32_t is_noncont_src; uint32_t is_noncont_dst;} to: @@ -1429,6 +1429,10 @@ Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen type name changed from 'void' to 'bool' type size changed from 0 to 8 (in bits) + [C] 'method std::pair, bool> std::_Rb_tree, std::less, std::allocator >::_M_insert_unique(PtrData&&)' at stl_tree.h:1850:1 has some indirect sub-type changes: + parameter 1 of type 'PtrData&&' changed: + rvalue reference type 'PtrData&& became an lvalue reference type: 'PtrData&' + [C] 'method void std::vector >::_M_emplace_back_aux(const VarTable::Entry*&&)' at vector.tcc:407:1 has some indirect sub-type changes: Please note that the symbol of this function is _ZNSt6vectorIPKN8VarTable5EntryESaIS3_EE19_M_emplace_back_auxIJS3_EEEvDpOT_ and it aliases symbol: _ZNSt6vectorIPKN8VarTable5EntryESaIS3_EE19_M_emplace_back_auxIIS3_EEEvDpOT_ diff --git a/tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt b/tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt index 80a26f29..7fcf60dc 100644 --- a/tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt +++ b/tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt @@ -1,4 +1,4 @@ -Functions changes summary: 82 Removed, 6 Changed (33 filtered out), 1081 Added functions +Functions changes summary: 82 Removed, 7 Changed (32 filtered out), 1081 Added functions Variables changes summary: 47 Removed, 1 Changed, 11 Added variables Function symbols changes summary: 7 Removed, 76 Added function symbols not referenced by debug info Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info @@ -1172,7 +1172,7 @@ Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen [A] 'method void std::vector >::vector(Iterator, Iterator, const std::vector >::allocator_type&)' [A] 'method std::vector >::~vector()' -6 functions with some indirect sub-type change: +7 functions with some indirect sub-type change: [C] 'method void Engine::fini_process(bool)' at offload_engine.cpp:184:1 has some indirect sub-type changes: implicit parameter 0 of type 'Engine*' has sub-type changes: @@ -1260,7 +1260,7 @@ Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen type of 'union {struct {uint32_t is_static; uint32_t is_static_dstn; uint32_t has_length; uint32_t is_stack_buf; uint32_t sink_addr; uint32_t alloc_disp; uint32_t is_noncont_src; uint32_t is_noncont_dst;}; uint32_t bits;} flags' changed: type name changed from 'VarDesc::__anonymous_union__2' to 'varDescFlags' type size hasn't changed - 1 data member changes (1 filtered): + 1 data member change: anonymous data member at offset 0 (in bytes) changed from: struct {uint32_t is_static; uint32_t is_static_dstn; uint32_t has_length; uint32_t is_stack_buf; uint32_t sink_addr; uint32_t alloc_disp; uint32_t is_noncont_src; uint32_t is_noncont_dst;} to: @@ -1429,6 +1429,10 @@ Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen type name changed from 'void' to 'bool' type size changed from 0 to 0x1 (in bytes) + [C] 'method std::pair, bool> std::_Rb_tree, std::less, std::allocator >::_M_insert_unique(PtrData&&)' at stl_tree.h:1850:1 has some indirect sub-type changes: + parameter 1 of type 'PtrData&&' changed: + rvalue reference type 'PtrData&& became an lvalue reference type: 'PtrData&' + [C] 'method void std::vector >::_M_emplace_back_aux(const VarTable::Entry*&&)' at vector.tcc:407:1 has some indirect sub-type changes: Please note that the symbol of this function is _ZNSt6vectorIPKN8VarTable5EntryESaIS3_EE19_M_emplace_back_auxIJS3_EEEvDpOT_ and it aliases symbol: _ZNSt6vectorIPKN8VarTable5EntryESaIS3_EE19_M_emplace_back_auxIIS3_EEEvDpOT_ diff --git a/tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt b/tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt index 60ba1c23..3144ee00 100644 --- a/tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt +++ b/tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt @@ -1,4 +1,4 @@ -Functions changes summary: 82 Removed, 6 Changed (33 filtered out), 0 Added (1081 filtered out) functions +Functions changes summary: 82 Removed, 7 Changed (32 filtered out), 0 Added (1081 filtered out) functions Variables changes summary: 47 Removed, 1 Changed, 0 Added (11 filtered out) variables Function symbols changes summary: 7 Removed, 0 Added (76 filtered out) function symbols not referenced by debug info Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info @@ -88,7 +88,7 @@ Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen [D] 'function void std::__unguarded_linear_insert >(VarList::BufEntry*, __gnu_cxx::__ops::_Val_comp_iter)' [D] 'function void write_message(FILE*, int, __va_list_tag*)' -6 functions with some indirect sub-type change: +7 functions with some indirect sub-type change: [C] 'method void Engine::fini_process(bool)' has some indirect sub-type changes: implicit parameter 0 of type 'Engine*' has sub-type changes: @@ -176,7 +176,7 @@ Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen type of 'union {struct {uint32_t is_static; uint32_t is_static_dstn; uint32_t has_length; uint32_t is_stack_buf; uint32_t sink_addr; uint32_t alloc_disp; uint32_t is_noncont_src; uint32_t is_noncont_dst;}; uint32_t bits;} flags' changed: type name changed from 'VarDesc::__anonymous_union__2' to 'varDescFlags' type size hasn't changed - 1 data member changes (1 filtered): + 1 data member change: anonymous data member at offset 0 (in bits) changed from: struct {uint32_t is_static; uint32_t is_static_dstn; uint32_t has_length; uint32_t is_stack_buf; uint32_t sink_addr; uint32_t alloc_disp; uint32_t is_noncont_src; uint32_t is_noncont_dst;} to: @@ -345,6 +345,10 @@ Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen type name changed from 'void' to 'bool' type size changed from 0 to 8 (in bits) + [C] 'method std::pair, bool> std::_Rb_tree, std::less, std::allocator >::_M_insert_unique(PtrData&&)' has some indirect sub-type changes: + parameter 1 of type 'PtrData&&' changed: + rvalue reference type 'PtrData&& became an lvalue reference type: 'PtrData&' + [C] 'method void std::vector >::_M_emplace_back_aux(const VarTable::Entry*&&)' has some indirect sub-type changes: Please note that the symbol of this function is _ZNSt6vectorIPKN8VarTable5EntryESaIS3_EE19_M_emplace_back_auxIJS3_EEEvDpOT_ and it aliases symbol: _ZNSt6vectorIPKN8VarTable5EntryESaIS3_EE19_M_emplace_back_auxIIS3_EEEvDpOT_ diff --git a/tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-1.txt b/tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-1.txt index f1bfe222..f3d453cc 100644 --- a/tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-1.txt +++ b/tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-1.txt @@ -1,4 +1,4 @@ -Functions changes summary: 82 Removed, 6 Changed (33 filtered out), 0 Added (1081 filtered out) functions +Functions changes summary: 82 Removed, 7 Changed (32 filtered out), 0 Added (1081 filtered out) functions Variables changes summary: 0 Removed (47 filtered out), 1 Changed, 0 Added (11 filtered out) variables Function symbols changes summary: 7 Removed, 0 Added (76 filtered out) function symbols not referenced by debug info Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info diff --git a/tests/data/test-diff-filter/test41-report-0.txt b/tests/data/test-diff-filter/test41-report-0.txt index d5c7f181..8881004c 100644 --- a/tests/data/test-diff-filter/test41-report-0.txt +++ b/tests/data/test-diff-filter/test41-report-0.txt @@ -124,7 +124,7 @@ Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen class std::allocator, std::allocator > > at allocator.h:108:1 1 base class insertion: class std::allocator > at allocator.h:108:1 - 3 data member changes (1 filtered): + 2 data member changes (1 filtered): type of 'std::_Deque_base, std::allocator >, std::allocator, std::allocator > > >::_Map_pointer _M_map' changed: typedef name changed from std::_Deque_base, std::allocator >, std::allocator, std::allocator > > >::_Map_pointer to std::_Deque_base, std::allocator > >::_Map_pointer at stl_deque.h:542:1 underlying type 'typedef std::_Deque_iterator, std::allocator >, std::__cxx11::basic_string, std::allocator >&, std::__cxx11::basic_string, std::allocator >*>::_Map_pointer' at stl_deque.h:123:1 changed: @@ -137,17 +137,13 @@ Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen underlying type 'struct std::_Deque_iterator, std::allocator >, std::__cxx11::basic_string, std::allocator >&, std::__cxx11::basic_string, std::allocator >*>' at stl_deque.h:106:1 changed: type name changed from 'std::_Deque_iterator, std::allocator >, std::__cxx11::basic_string, std::allocator >&, std::__cxx11::basic_string, std::allocator >*>' to 'std::_Deque_iterator, std::__cxx11::basic_string &, std::__cxx11::basic_string *>' type size hasn't changed - 4 data member changes: + 1 data member changes (3 filtered): type of 'std::_Deque_iterator, std::allocator >, std::__cxx11::basic_string, std::allocator >&, std::__cxx11::basic_string, std::allocator >*>::_Elt_pointer _M_cur' changed: typedef name changed from std::_Deque_iterator, std::allocator >, std::__cxx11::basic_string, std::allocator >&, std::__cxx11::basic_string, std::allocator >*>::_Elt_pointer to std::_Deque_iterator, std::__cxx11::basic_string &, std::__cxx11::basic_string *>::_Elt_pointer at stl_deque.h:111:1 underlying type 'typedef std::_Deque_iterator, std::allocator >, std::__cxx11::basic_string, std::allocator >&, std::__cxx11::basic_string, std::allocator >*>::__ptr_to' at stl_deque.h:116:1 changed: entity changed from 'typedef std::_Deque_iterator, std::allocator >, std::__cxx11::basic_string, std::allocator >&, std::__cxx11::basic_string, std::allocator >*>::__ptr_to' to compatible type 'std::__cxx11::basic_string, std::allocator >*' and name of 'std::_Deque_iterator, std::allocator >, std::__cxx11::basic_string, std::allocator >&, std::__cxx11::basic_string, std::allocator >*>::_M_cur' changed to 'std::_Deque_iterator, std::__cxx11::basic_string &, std::__cxx11::basic_string *>::_M_cur' at stl_deque.h:137:1 - name of 'std::_Deque_iterator, std::allocator >, std::__cxx11::basic_string, std::allocator >&, std::__cxx11::basic_string, std::allocator >*>::_M_first' changed to 'std::_Deque_iterator, std::__cxx11::basic_string &, std::__cxx11::basic_string *>::_M_first' at stl_deque.h:138:1 - name of 'std::_Deque_iterator, std::allocator >, std::__cxx11::basic_string, std::allocator >&, std::__cxx11::basic_string, std::allocator >*>::_M_last' changed to 'std::_Deque_iterator, std::__cxx11::basic_string &, std::__cxx11::basic_string *>::_M_last' at stl_deque.h:139:1 - name of 'std::_Deque_iterator, std::allocator >, std::__cxx11::basic_string, std::allocator >&, std::__cxx11::basic_string, std::allocator >*>::_M_node' changed to 'std::_Deque_iterator, std::__cxx11::basic_string &, std::__cxx11::basic_string *>::_M_node' at stl_deque.h:140:1 and name of 'std::_Deque_base, std::allocator >, std::allocator, std::allocator > > >::_Deque_impl::_M_start' changed to 'std::_Deque_base, std::allocator > >::_Deque_impl::_M_start' at stl_deque.h:552:1 - name of 'std::_Deque_base, std::allocator >, std::allocator, std::allocator > > >::_Deque_impl::_M_finish' changed to 'std::_Deque_base, std::allocator > >::_Deque_impl::_M_finish' at stl_deque.h:553:1 and name of 'std::_Deque_base, std::allocator >, std::allocator, std::allocator > > >::_M_impl' changed to 'std::_Deque_base, std::allocator > >::_M_impl' at stl_deque.h:631:1 1 Removed function symbol not referenced by debug info: diff --git a/tests/data/test-diff-filter/test47-filter-void-ptr-change-report-0.txt b/tests/data/test-diff-filter/test47-filter-void-ptr-change-report-0.txt index e69de29b..e644b0f1 100644 --- a/tests/data/test-diff-filter/test47-filter-void-ptr-change-report-0.txt +++ b/tests/data/test-diff-filter/test47-filter-void-ptr-change-report-0.txt @@ -0,0 +1,26 @@ +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 void bar(S1*)' at test47-filter-void-ptr-change-v0.c:17:1 has some indirect sub-type changes: + parameter 1 of type 'S1*' has sub-type changes: + in pointed to type 'struct S1' at test47-filter-void-ptr-change-v1.c:8:1: + type size hasn't changed + 1 data member change: + type of 'POINTER m0' changed: + underlying type 'void*' changed: + in pointed to type 'void': + entity changed from 'void' to 'const char' + type size changed from 0 to 8 (in bits) + + [C] 'function void foo(S0*)' at test47-filter-void-ptr-change-v0.c:13:1 has some indirect sub-type changes: + parameter 1 of type 'S0*' has sub-type changes: + in pointed to type 'struct S0' at test47-filter-void-ptr-change-v1.c:1:1: + type size hasn't changed + 1 data member change: + type of 'void* m0' changed: + in pointed to type 'void': + type name changed from 'void' to 'int' + type size changed from 0 to 32 (in bits) + diff --git a/tests/data/test-diff-filter/test7-report.txt b/tests/data/test-diff-filter/test7-report.txt index b1600f86..268ae2ef 100644 --- a/tests/data/test-diff-filter/test7-report.txt +++ b/tests/data/test-diff-filter/test7-report.txt @@ -7,5 +7,4 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added variable return type changed: type name changed from 'return_type' to 'other_return_type' type size hasn't changed - no data member change (1 filtered); From patchwork Thu Aug 29 15:56:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 96708 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 434DF385EC25 for ; Thu, 29 Aug 2024 15:56:57 +0000 (GMT) X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 6E0113858402 for ; Thu, 29 Aug 2024 15:56:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6E0113858402 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6E0113858402 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724947010; cv=none; b=FcO4iHyiBf6UI8azXsU7ASyx9Eq4thfMEU1WfqXViUr0T/B8kNn+nk9RmNrXHvPzttFQhtuA8ZHzqBgdDaUEsFH8+TzJCJ3nOMuafw/P0kify8tuujQAhiP3SkMqm7l9drdg4M5EJ47ehjP+zppgJt+yjhylzwTvYbzWm6K2oQo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724947010; c=relaxed/simple; bh=JieWLX0LnVUJx7ny9li/WLlWuy/kJEHXDQxxK6wjrqE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=mNbMewphzkUKXy7I9i2LzuZnMVSdwbf0iWX+PhSKaWbzp+Ngn3fSYGZ0pkVcvrxrK/eCiqjq6YX9sMD8MnOKN44K01aGvCyTIjDooQ1MCgS1ei2Uq6a1nI6Wr4x/1BeRdf4rUv8u0+EeaMB7oMg2yUvqIyo1YZl+rnlt9Gm9trE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724947008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DeegUR83a/606KrzeXzhCaxQ/woO6tOdNzBJtkLlolA=; b=FnIguM8KyOgqgRQqnd8ZxfJ1yLTjFA5Tnn1QfCijDn5c+3pbsRQliuxZ41XLGi+3bV4g7e eGjBJWxvfq4l7GyYEH4Ne39EQze+bCOVnQbfvKxKEoa0P5FvAmWEJsnR228iMZaY9AEaay watEgfGZ02Ccyd06BET+r4YJFeJO6so= Received: from mail-ot1-f69.google.com (mail-ot1-f69.google.com [209.85.210.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-600-6bpE9PdjPUeTUYBQf-sTvw-1; Thu, 29 Aug 2024 11:56:47 -0400 X-MC-Unique: 6bpE9PdjPUeTUYBQf-sTvw-1 Received: by mail-ot1-f69.google.com with SMTP id 46e09a7af769-709399c7828so1601103a34.3 for ; Thu, 29 Aug 2024 08:56:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724947006; x=1725551806; h=mime-version:user-agent:message-id:in-reply-to:date:references :organization:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DeegUR83a/606KrzeXzhCaxQ/woO6tOdNzBJtkLlolA=; b=VhmTVuSnlaiKhwMJ5A03JP/55mOD4kc1OYkwrDqCOW7S/supy8jk2KQM2+Do7NKr7G Pe0R01BOIddEX5VgjD5x61TY67gBQFDC7T9MH6SEg1WyMloamjY9dIDkE+7lCdrOxR6O r2FWI2lyN51ZkXNFwZntMwzEppA7uFXR5zlxuQRsCU8sxuWyuDOPUYfXnBEKvJaV+ic1 lWz+Sb2efxObu7XQly19n0QsHu5Jgm92ay+w3kV04WEL5XMTmHeaKuhPXMC3pi1ej65T v1ETuNqlJONgVhMwJGDfiTyvERxZ3oPAjNbZVuDuB3EgnoUKbHJ5upSIqiM+nwIVo2Vm QhXw== X-Gm-Message-State: AOJu0YzgNVtjgwM3AYsKdRk9rJmjye5I71h1rMIjl944eV56OViXbe1f Y20vcZQBCorVa8VPw79Urf9Sz9XljPtKxXGsAAOBRzjAEf4dm9TdR/ULmpGKEUxWWKRjIiw1kdp 1ZInMi7n+uNK5inh5Sp28oeZdbqC4dj7QxksmMbjDhAKlPkvN/e9nXPOZ35rl+LwwUA== X-Received: by 2002:a05:6870:15c1:b0:254:9501:db80 with SMTP id 586e51a60fabf-277900eaa71mr3781075fac.14.1724947006119; Thu, 29 Aug 2024 08:56:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFa/MG8qnRrXuq+w+Sb41gl/Ywh4Jdz8wcGmDpcclHHDYQbiq7P67TF0sx3wGCb3F88QtWnWA== X-Received: by 2002:a05:6870:15c1:b0:254:9501:db80 with SMTP id 586e51a60fabf-277900eaa71mr3781053fac.14.1724947005683; Thu, 29 Aug 2024 08:56:45 -0700 (PDT) Received: from localhost (88-120-130-27.subs.proxad.net. [88.120.130.27]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a806d4287dsm61830985a.75.2024.08.29.08.56.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 08:56:45 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id CC6D3503C602; Thu, 29 Aug 2024 17:56:43 +0200 (CEST) From: Dodji Seketeli To: dodji@redhat.com Cc: libabigail@sourceware.org Subject: [PATCH 05/27] comp-filter: Ignore ptr size when detecting void ptr to ptr change Organization: Me, myself and I References: <20240829154711.1883174-1-dodji@redhat.com> X-Operating-System: AlmaLinux 9.4 X-URL: http://www.seketeli.net/~dodji Date: Thu, 29 Aug 2024 17:56:43 +0200 In-Reply-To: <20240829154711.1883174-1-dodji@redhat.com> (dodji@redhat.com's message of "Thu, 29 Aug 2024 17:46:29 +0200") Message-ID: <87o75bmif8.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libabigail-bounces~patchwork=sourceware.org@sourceware.org Hello, Note that the output of the test runtestdifffilter has been ameliorated as void pointer to pointer changes are now completely ignored. There are still 2 tests that fail after this patch so they are still XFAILed: runtestdiffpkg and runtestabidiffexit. They are going to be addressed by subsequent patches. * src/abg-comp-filter.cc (has_void_ptr_to_ptr_change): Ignore pointer size when detecting void pointer to pointer change. * tests/data/test-diff-filter/test47-filter-void-ptr-change-report-0.txt: Adjust. Signed-off-by: Dodji Seketeli --- src/abg-comp-filter.cc | 9 ++++--- ...test47-filter-void-ptr-change-report-0.txt | 25 +------------------ 2 files changed, 7 insertions(+), 27 deletions(-) diff --git a/src/abg-comp-filter.cc b/src/abg-comp-filter.cc index 823b5566..98e629de 100644 --- a/src/abg-comp-filter.cc +++ b/src/abg-comp-filter.cc @@ -2008,7 +2008,8 @@ has_void_ptr_to_ptr_change(const diff* dif) if (is_void_pointer_type_equivalent(f) && is_pointer_type(s) && !is_void_pointer_type_equivalent(s) - && f->get_size_in_bits() == s->get_size_in_bits()) + && ((f->get_size_in_bits() == 0) + || (f->get_size_in_bits() == s->get_size_in_bits()))) return true; } else if (const pointer_diff *d = is_pointer_diff(dif)) @@ -2022,7 +2023,8 @@ has_void_ptr_to_ptr_change(const diff* dif) if (is_void_pointer_type_equivalent(f) && is_pointer_type(s) && !is_void_pointer_type_equivalent(s) - && f->get_size_in_bits() == s->get_size_in_bits()) + && ((f->get_size_in_bits() == 0) + || (f->get_size_in_bits() == s->get_size_in_bits()))) return true; } else if (const qualified_type_diff *d = is_qualified_type_diff(dif)) @@ -2036,7 +2038,8 @@ has_void_ptr_to_ptr_change(const diff* dif) if (is_void_pointer_type_equivalent(f) && is_pointer_type(s) && !is_void_pointer_type_equivalent(s) - && f->get_size_in_bits() == s->get_size_in_bits()) + && ((f->get_size_in_bits() == 0) + || (f->get_size_in_bits() == s->get_size_in_bits()))) return true; } diff --git a/tests/data/test-diff-filter/test47-filter-void-ptr-change-report-0.txt b/tests/data/test-diff-filter/test47-filter-void-ptr-change-report-0.txt index e644b0f1..41fc64d9 100644 --- a/tests/data/test-diff-filter/test47-filter-void-ptr-change-report-0.txt +++ b/tests/data/test-diff-filter/test47-filter-void-ptr-change-report-0.txt @@ -1,26 +1,3 @@ -Functions changes summary: 0 Removed, 2 Changed, 0 Added functions +Functions changes summary: 0 Removed, 0 Changed (2 filtered out), 0 Added functions Variables changes summary: 0 Removed, 0 Changed, 0 Added variable -2 functions with some indirect sub-type change: - - [C] 'function void bar(S1*)' at test47-filter-void-ptr-change-v0.c:17:1 has some indirect sub-type changes: - parameter 1 of type 'S1*' has sub-type changes: - in pointed to type 'struct S1' at test47-filter-void-ptr-change-v1.c:8:1: - type size hasn't changed - 1 data member change: - type of 'POINTER m0' changed: - underlying type 'void*' changed: - in pointed to type 'void': - entity changed from 'void' to 'const char' - type size changed from 0 to 8 (in bits) - - [C] 'function void foo(S0*)' at test47-filter-void-ptr-change-v0.c:13:1 has some indirect sub-type changes: - parameter 1 of type 'S0*' has sub-type changes: - in pointed to type 'struct S0' at test47-filter-void-ptr-change-v1.c:1:1: - type size hasn't changed - 1 data member change: - type of 'void* m0' changed: - in pointed to type 'void': - type name changed from 'void' to 'int' - type size changed from 0 to 32 (in bits) - From patchwork Thu Aug 29 15:57:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 96710 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3B0C6385DDE6 for ; Thu, 29 Aug 2024 15:58:17 +0000 (GMT) X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id E80FF385F01D for ; Thu, 29 Aug 2024 15:57:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E80FF385F01D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E80FF385F01D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724947075; cv=none; b=pLVoFyrlnOhG3vWxWiezqYbucM/15ouYqIOdz0zPHzc5jRM8oP8cW9jrBPi5SxJY8Du3IWO48nWX7bwo9bI9pBBJ8ANLEFPM1APgU+x7gpqkxo4BbtSg3VeCyH0s4/MpaF55DtUvXFff8Lc8D+XZktjFi9zyJ1E5MjqEqz1tgy8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724947075; c=relaxed/simple; bh=Ana2BpgOk2dBhxb0uOIyKGHuoFvgC5zB8++Jw7ChNgQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=nbqXgcC6Ztj0ExYe7j9aZKJa+uSTA92z23L8bWJ7o8BvgeI0GPkjbE4mgcxdp7wczTv+nGu3YpiwH1P/y2vy9zY5ZymWZAMts2N81RrreN/PzTOgaNuRU99NsjilrIROKf4UfY833Bw+yftRgVPUL4RbVumDME73k8NE4RqAmYM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724947064; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fOK+cXXCfv4tSgIobTQu52M/Z1Hqoyj700laK23tcGo=; b=iQcoh2O8kYvQ5uTUbDSkgSd6I4bCVSGujQir1CkDd7aPQq7MOTTL9+DH6XEdl2tZCQldFF 38QlTNQc7j7EZKNHCimBkS+r2alrG07JkW86weFBmUWDg/YCmDHT8QL+MspjrMihslMoKw IuUqZcSUYYgr066A4rAgWt3YkVP5+cY= Received: from mail-vk1-f200.google.com (mail-vk1-f200.google.com [209.85.221.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-407-jzc64ceGPYqcvAAUB6pW7A-1; Thu, 29 Aug 2024 11:57:36 -0400 X-MC-Unique: jzc64ceGPYqcvAAUB6pW7A-1 Received: by mail-vk1-f200.google.com with SMTP id 71dfb90a1353d-4feade4b21aso269814e0c.0 for ; Thu, 29 Aug 2024 08:57:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724947056; x=1725551856; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:organization:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mCCafu2v1OP+TzSP2nYwMGhOHEP0vt3WF3mFZ2mSXno=; b=LAxMy/gxh8kpEXoxyXOLwSe5rsvFxV+DddM22pF4zzshV/w/zXRGpL5ob6ii7A2K0C GGPWmIWSATbhNwmk69OGZFiK/Blnq0RrNbe1De7x9Dn1qJWmiSJahduJIC4vXJknYf0w QfY7R9KfOvuFzUNXBqh5b4yug1iM4NNRa7BGQGI5RN3rUpsXeJm8UJg/bRKoBdIWgDXX pH+9Mc0atdYQYdBfJRrzY7qUKh2KisZXQkOwl9a7kRu3bp0HRuquqzGm+XLLGJEy4sPk Rp8SBBVNYtAiK5gb4ZVSNfbBRFvr/XsJCopOQiKHquGd9wTnkKVAshejnPupdZNdPjSm 7nFw== X-Gm-Message-State: AOJu0YxInobg/Xlsioa1pf6UWC3MRVMts3tNjNk8R/WBqH7Ihxu2EQOL oKBiYKuCMi3eIEgGNZHnDgOpY9ZkWXQqd+i8W7gfdryvEIngJNHB9VaLxg+3xoA0JuNzwV7WUuE jSUAsoSqH4jFa6BVEDaoPcQHf9ozfVnzDSAZyv3ShdN/cxp2Gt/8hDkfbb3bhV+bm4w== X-Received: by 2002:a05:6122:3c4f:b0:4f5:2b7f:f1a7 with SMTP id 71dfb90a1353d-4fff16f63c2mr3789568e0c.13.1724947054560; Thu, 29 Aug 2024 08:57:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFzfDMK8mAAGDcamQ5+FtsQHOWTslV2jp4RBKCLenmPVLOj5JGXLOeBLDJxyt6+6A33u9tAZA== X-Received: by 2002:a05:6122:3c4f:b0:4f5:2b7f:f1a7 with SMTP id 71dfb90a1353d-4fff16f63c2mr3789512e0c.13.1724947053592; Thu, 29 Aug 2024 08:57:33 -0700 (PDT) Received: from localhost (88-120-130-27.subs.proxad.net. [88.120.130.27]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a806c4a32bsm62476485a.62.2024.08.29.08.57.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 08:57:32 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id 0D6A5503C602; Thu, 29 Aug 2024 17:57:30 +0200 (CEST) From: Dodji Seketeli To: dodji@redhat.com Cc: libabigail@sourceware.org Subject: [PATCH 06/27] Don't strip typedefs in fn names when pretty-printing and comparing Organization: Me, myself and I References: <20240829154711.1883174-1-dodji@redhat.com> X-Operating-System: AlmaLinux 9.4 X-URL: http://www.seketeli.net/~dodji Date: Thu, 29 Aug 2024 17:57:29 +0200 In-Reply-To: <20240829154711.1883174-1-dodji@redhat.com> (dodji@redhat.com's message of "Thu, 29 Aug 2024 17:46:29 +0200") Message-ID: <87jzfzmidy.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libabigail-bounces~patchwork=sourceware.org@sourceware.org Hello, This removes a kludge that was needed to avoid spurious changes back when we didn't have hashing based comparison for type canonicalization. If, in the future, we remove the type name based comparison speed optimization during canonicalization, this patch will be even more relevant. For now, it greatly simplifies the code base already and it fixes several issues from the type hashing patch, so much so that runtestdiffpkg and runtestdifffilter now PASS. runtestabidiffexit still fails so it's still XFAILed. * src/abg-ir.cc (get_function_type_name, get_method_type_name): Do not peel typedef from return type. (equals): In the overload for function_type, do not peel typedef before comparing return types. In the overload for function_decl::parameter, do not peel typedef before comparing the parameter type. (stream_pretty_representation_of_fn_parms): Do not strip typedef from parameter types. (add_outer_pointer_to_fn_type_expr): Likewise for return type. * tests/Makefile.am: XFAIL the test runtestabidiffexit. * tests/data/test-abidiff-exit/PR30503/libsdl/libsdl-1.2.60-1.2.64-report.txt: Adjust. * tests/data/test-abidiff-exit/PR31513/reported/PR31513-reported-report-1.txt: Likewise. * tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-output-1.txt: Likewise. * tests/data/test-annotate/test13-pr18894.so.abi: Likewise. * tests/data/test-annotate/test14-pr18893.so.abi: Likewise. * 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-diff-dwarf-abixml/PR25409-librte_bus_dpaa.so.20.0.abi: Likewise. * tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1.abi: Likewise. * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt: 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/PR25042-libgdbm-clang-dwarf5.so.6.0.0.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/test13-pr18894.so.abi: Likewise. * tests/data/test-read-dwarf/test14-pr18893.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 --- src/abg-ir.cc | 22 +- tests/Makefile.am | 6 - .../libsdl/libsdl-1.2.60-1.2.64-report.txt | 2 +- .../reported/PR31513-reported-report-1.txt | 20 +- .../test-ptr-to-mbr2-output-1.txt | 1 - .../data/test-annotate/test13-pr18894.so.abi | 10 +- .../data/test-annotate/test14-pr18893.so.abi | 4 +- .../data/test-annotate/test15-pr18892.so.abi | 242 +-- .../data/test-annotate/test17-pr19027.so.abi | 20 +- ...st18-pr19037-libvtkRenderingLIC-6.1.so.abi | 12 +- ...19-pr19023-libtcmalloc_and_profiler.so.abi | 54 +- ...st20-pr19025-libvtkParallelCore-6.1.so.abi | 12 +- .../data/test-annotate/test21-pr19092.so.abi | 8 +- .../PR25409-librte_bus_dpaa.so.20.0.abi | 18 +- .../test0-pr19026-libvtkIOSQL-6.1.so.1.abi | 14 +- ...l7.x86_64-0.12.8-1.el7.x86_64-report-2.txt | 5 + .../PR22015-libboost_iostreams.so.abi | 2 +- .../test-read-dwarf/PR22122-libftdc.so.abi | 4 +- .../data/test-read-dwarf/PR25007-sdhci.ko.abi | 32 +- .../PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi | 32 +- .../test-read-dwarf/test-libaaudio.so.abi | 102 +- .../test-read-dwarf/test-libandroid.so.abi | 1398 ++++++++--------- .../test-read-dwarf/test10-pr18818-gcc.so.abi | 10 +- .../test-read-dwarf/test11-pr18828.so.abi | 4 +- .../test-read-dwarf/test12-pr18844.so.abi | 68 +- .../test-read-dwarf/test13-pr18894.so.abi | 10 +- .../test-read-dwarf/test14-pr18893.so.abi | 4 +- .../test-read-dwarf/test15-pr18892.so.abi | 242 +-- .../test-read-dwarf/test16-pr18904.so.abi | 38 +- .../test-read-dwarf/test17-pr19027.so.abi | 20 +- ...st18-pr19037-libvtkRenderingLIC-6.1.so.abi | 12 +- ...19-pr19023-libtcmalloc_and_profiler.so.abi | 54 +- ...st20-pr19025-libvtkParallelCore-6.1.so.abi | 12 +- .../test-read-dwarf/test21-pr19092.so.abi | 8 +- .../test22-pr19097-libstdc++.so.6.0.17.so.abi | 396 ++--- .../test9-pr18818-clang.so.abi | 10 +- 36 files changed, 1456 insertions(+), 1452 deletions(-) diff --git a/src/abg-ir.cc b/src/abg-ir.cc index d0fafd02..abc1b145 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -8848,10 +8848,7 @@ get_function_type_name(const function_type& fn_type, // canonicalization), we want its representation to stay the same, // regardless of typedefs. So let's strip typedefs from the return // type. - type_base_sptr return_type = - internal - ? peel_typedef_type(fn_type.get_return_type()) - : fn_type.get_return_type(); + type_base_sptr return_type = fn_type.get_return_type(); const environment& env = fn_type.get_environment(); o << get_type_name(return_type, /*qualified=*/true, internal) << " "; @@ -8939,10 +8936,8 @@ get_method_type_name(const method_type& fn_type, // canonicalization), we want its representation to stay the same, // regardless of typedefs. So let's strip typedefs from the return // type. - type_base_sptr return_type = - internal - ? peel_typedef_type(fn_type.get_return_type()) - : fn_type.get_return_type(); + type_base_sptr return_type = fn_type.get_return_type(); + const environment& env = fn_type.get_environment(); if (return_type) @@ -28423,11 +28418,7 @@ stream_pretty_representation_of_fn_parms(const function_type& fn_type, if (env.is_variadic_parameter_type(type)) o << "..."; else - { - if (internal) - type = peel_typedef_type(type); - o << get_type_name(type, qualified, internal); - } + o << get_type_name(type, qualified, internal); } } o << ")"; @@ -28511,11 +28502,8 @@ add_outer_pointer_to_fn_type_expr(const type_base* p, type_base_sptr type; stream_pretty_representation_of_fn_parms(*pointed_to_fn, right, qualified, internal); - type_base_sptr return_type = - internal - ? peel_typedef_type(pointed_to_fn->get_return_type()) - : pointed_to_fn->get_return_type(); + type_base_sptr return_type = pointed_to_fn->get_return_type(); string result; if (is_npaf_type(return_type) diff --git a/tests/Makefile.am b/tests/Makefile.am index 3cb95fdc..90dfc258 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -69,12 +69,6 @@ else TESTS += runtestdefaultsupprs.py endif -# These tests temporarily fail after the commit that introduced type -# hashing. Their failure is due to long standing issues that have -# been uncovered by the type hashing commit. Subsequent commits that -# are logically not related to the type hashing commit will fix the -# issues and as a result, these test will PASS again. For now, let's -# mark them as being XFAIL. XFAIL_TESTS = runtestabidiffexit EXTRA_DIST = \ diff --git a/tests/data/test-abidiff-exit/PR30503/libsdl/libsdl-1.2.60-1.2.64-report.txt b/tests/data/test-abidiff-exit/PR30503/libsdl/libsdl-1.2.60-1.2.64-report.txt index 6d7dd686..2866f16e 100644 --- a/tests/data/test-abidiff-exit/PR30503/libsdl/libsdl-1.2.60-1.2.64-report.txt +++ b/tests/data/test-abidiff-exit/PR30503/libsdl/libsdl-1.2.60-1.2.64-report.txt @@ -17,7 +17,7 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added variable in pointed to type 'struct SDL_AudioCVT' at SDL12_compat.c:907:1: type name changed from 'SDL_AudioCVT' to 'SDL12_AudioCVT' type size changed from 1024 to 1088 (in bits) - 3 data member changes (8 filtered): + 3 data member changes (2 filtered): 'double len_ratio' offset changed from 288 to 320 (in bits) (by +32 bits) name of 'SDL_AudioCVT::filters' changed to 'SDL12_AudioCVT::filters' at SDL12_compat.c:918:1, offset changed from 352 to 384 (in bits) (by +32 bits) 'int filter_index' offset changed from 992 to 1024 (in bits) (by +32 bits) diff --git a/tests/data/test-abidiff-exit/PR31513/reported/PR31513-reported-report-1.txt b/tests/data/test-abidiff-exit/PR31513/reported/PR31513-reported-report-1.txt index 97a60244..380ad7c7 100644 --- a/tests/data/test-abidiff-exit/PR31513/reported/PR31513-reported-report-1.txt +++ b/tests/data/test-abidiff-exit/PR31513/reported/PR31513-reported-report-1.txt @@ -1,4 +1,4 @@ -Functions changes summary: 16 Removed, 0 Changed (22 filtered out), 21 Added functions +Functions changes summary: 16 Removed, 1 Changed (21 filtered out), 21 Added functions Variables changes summary: 0 Removed, 0 Changed, 0 Added variable Function symbols changes summary: 2 Removed, 2 Added function symbols not referenced by debug info Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referenced by debug info @@ -46,6 +46,24 @@ Variable symbols changes summary: 0 Removed, 0 Added variable symbol not referen [A] 'method std::vector >::reference std::vector >::back()' {_ZNSt6vectorIcSaIcEE4backEv} [A] 'method std::vector >::reference std::vector >::emplace_back()' {_ZNSt6vectorIcSaIcEE12emplace_backIJcEEERcDpOT_} +1 function with some indirect sub-type change: + + [C] 'method int qiifa::class1::addnums(int, int)' at class1.cpp:24:1 has some indirect sub-type changes: + implicit parameter 0 of type 'qiifa::class1*' has sub-type changes: + in pointed to type 'class qiifa::class1' at class1.h:27:1: + type size hasn't changed + 1 data member change: + type of 'std::vector > letters' changed: + type size hasn't changed + 1 base class change: + 'struct std::_Vector_base >' at stl_vector.h:74:1 changed: + type size hasn't changed + 1 data member change: + type of 'std::_Vector_base >::_Vector_impl _M_impl' changed: + type size hasn't changed + 1 base class insertion: + struct std::_Vector_base >::_Vector_impl_data at stl_vector.h:91:1 + 2 Removed function symbols not referenced by debug info: [D] _fini diff --git a/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-output-1.txt b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-output-1.txt index ad065c1a..91c0f670 100644 --- a/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-output-1.txt +++ b/tests/data/test-abidiff-exit/pointer-to-member/test-ptr-to-mbr2-output-1.txt @@ -9,5 +9,4 @@ Variables changes summary: 0 Removed, 1 Changed, 0 Added variable in containing type 'struct S' of pointed-to-member type 'int S::*' at test-ptr-to-mbr2-v1.cc:1:1: type name changed from 'S' to 'T' type size hasn't changed - no data member change (1 filtered); diff --git a/tests/data/test-annotate/test13-pr18894.so.abi b/tests/data/test-annotate/test13-pr18894.so.abi index cfc6285e..167f7802 100644 --- a/tests/data/test-annotate/test13-pr18894.so.abi +++ b/tests/data/test-annotate/test13-pr18894.so.abi @@ -891,7 +891,7 @@ - + @@ -2353,7 +2353,7 @@ - + @@ -2369,7 +2369,7 @@ - + @@ -2385,7 +2385,7 @@ - + @@ -3942,7 +3942,7 @@ - + diff --git a/tests/data/test-annotate/test14-pr18893.so.abi b/tests/data/test-annotate/test14-pr18893.so.abi index a6993ff0..39515bfd 100644 --- a/tests/data/test-annotate/test14-pr18893.so.abi +++ b/tests/data/test-annotate/test14-pr18893.so.abi @@ -6832,7 +6832,7 @@ - + @@ -6993,7 +6993,7 @@ - + diff --git a/tests/data/test-annotate/test15-pr18892.so.abi b/tests/data/test-annotate/test15-pr18892.so.abi index 3f5b2736..a64e47e9 100644 --- a/tests/data/test-annotate/test15-pr18892.so.abi +++ b/tests/data/test-annotate/test15-pr18892.so.abi @@ -3192,7 +3192,7 @@ - + @@ -3453,12 +3453,12 @@ - + - + @@ -3554,7 +3554,7 @@ - + @@ -4224,7 +4224,7 @@ - + @@ -4235,7 +4235,7 @@ - + @@ -4246,7 +4246,7 @@ - + @@ -4266,7 +4266,7 @@ - + @@ -4277,14 +4277,14 @@ - + - + @@ -4305,7 +4305,7 @@ - + @@ -5261,7 +5261,7 @@ - + @@ -6457,7 +6457,7 @@ - + @@ -6491,12 +6491,12 @@ - + - + @@ -6510,7 +6510,7 @@ - + @@ -7043,7 +7043,7 @@ - + @@ -8264,7 +8264,7 @@ - + @@ -8272,9 +8272,9 @@ - + - + @@ -8592,7 +8592,7 @@ - + @@ -8642,7 +8642,7 @@ - + @@ -8654,7 +8654,7 @@ - + @@ -8662,7 +8662,7 @@ - + @@ -8674,7 +8674,7 @@ - + @@ -8706,7 +8706,7 @@ - + @@ -8718,7 +8718,7 @@ - + @@ -8742,9 +8742,9 @@ - + - + @@ -8810,7 +8810,7 @@ - + @@ -9476,7 +9476,7 @@ - + @@ -9545,7 +9545,7 @@ - + @@ -9558,7 +9558,7 @@ - + @@ -9582,7 +9582,7 @@ - + @@ -9619,7 +9619,7 @@ - + @@ -9656,7 +9656,7 @@ - + @@ -9897,7 +9897,7 @@ - + @@ -9975,7 +9975,7 @@ - + @@ -10259,7 +10259,7 @@ - + @@ -10672,14 +10672,14 @@ - + - + @@ -10704,14 +10704,14 @@ - + - + @@ -19304,14 +19304,14 @@ - + - + @@ -19327,7 +19327,7 @@ - + @@ -19345,7 +19345,7 @@ - + @@ -19366,7 +19366,7 @@ - + @@ -19407,14 +19407,14 @@ - + - + @@ -19439,7 +19439,7 @@ - + @@ -19473,28 +19473,28 @@ - + - + - + - + @@ -19774,7 +19774,7 @@ - + @@ -19808,7 +19808,7 @@ - + @@ -19894,7 +19894,7 @@ - + @@ -19910,14 +19910,14 @@ - + - + @@ -19942,28 +19942,28 @@ - + - + - + - + @@ -19979,21 +19979,21 @@ - + - + - + @@ -20009,14 +20009,14 @@ - + - + @@ -20032,14 +20032,14 @@ - + - + @@ -20057,7 +20057,7 @@ - + @@ -20068,14 +20068,14 @@ - + - + @@ -20102,21 +20102,21 @@ - + - + - + @@ -20132,7 +20132,7 @@ - + @@ -20308,7 +20308,7 @@ - + @@ -20355,14 +20355,14 @@ - + - + @@ -20393,7 +20393,7 @@ - + @@ -20404,7 +20404,7 @@ - + @@ -20424,28 +20424,28 @@ - + - + - + - + @@ -20477,7 +20477,7 @@ - + @@ -20490,7 +20490,7 @@ - + @@ -20501,7 +20501,7 @@ - + @@ -20541,7 +20541,7 @@ - + @@ -20574,7 +20574,7 @@ - + @@ -20588,7 +20588,7 @@ - + @@ -20662,7 +20662,7 @@ - + @@ -20727,19 +20727,19 @@ - + - + - + @@ -21505,7 +21505,7 @@ - + @@ -21553,7 +21553,7 @@ - + @@ -21566,7 +21566,7 @@ - + @@ -22210,7 +22210,7 @@ - + @@ -22367,7 +22367,7 @@ - + @@ -22478,7 +22478,7 @@ - + @@ -22548,7 +22548,7 @@ - + @@ -22594,7 +22594,7 @@ - + @@ -22790,7 +22790,7 @@ - + @@ -22828,7 +22828,7 @@ - + @@ -22912,7 +22912,7 @@ - + @@ -22923,7 +22923,7 @@ - + @@ -23110,7 +23110,7 @@ - + @@ -23708,7 +23708,7 @@ - + @@ -26263,7 +26263,7 @@ - + @@ -26272,12 +26272,12 @@ - + - + @@ -26286,7 +26286,7 @@ - + @@ -26306,28 +26306,28 @@ - + - + - + - + @@ -26343,7 +26343,7 @@ - + @@ -28299,7 +28299,7 @@ - + diff --git a/tests/data/test-annotate/test17-pr19027.so.abi b/tests/data/test-annotate/test17-pr19027.so.abi index dad3f30e..7fb8cbce 100644 --- a/tests/data/test-annotate/test17-pr19027.so.abi +++ b/tests/data/test-annotate/test17-pr19027.so.abi @@ -1687,7 +1687,7 @@ - + @@ -1895,7 +1895,7 @@ - + @@ -2180,7 +2180,7 @@ - + @@ -4123,7 +4123,7 @@ - + @@ -4136,7 +4136,7 @@ - + @@ -4149,7 +4149,7 @@ - + @@ -13552,7 +13552,7 @@ - + @@ -14958,7 +14958,7 @@ - + @@ -15313,7 +15313,7 @@ - + @@ -15375,7 +15375,7 @@ - + diff --git a/tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi b/tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi index c0032c2a..8f6889ea 100644 --- a/tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi +++ b/tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi @@ -7139,7 +7139,7 @@ - + @@ -7150,7 +7150,7 @@ - + @@ -9607,7 +9607,7 @@ - + @@ -9618,7 +9618,7 @@ - + @@ -10082,7 +10082,7 @@ - + @@ -10100,7 +10100,7 @@ - + diff --git a/tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi b/tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi index 9309f2ab..06711846 100644 --- a/tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi +++ b/tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi @@ -2804,7 +2804,7 @@ - + @@ -2933,7 +2933,7 @@ - + @@ -3412,7 +3412,7 @@ - + @@ -4002,7 +4002,7 @@ - + @@ -4307,14 +4307,14 @@ - + - + @@ -7835,7 +7835,7 @@ - + @@ -8398,7 +8398,7 @@ - + @@ -8504,7 +8504,7 @@ - + @@ -10054,7 +10054,7 @@ - + @@ -10503,14 +10503,14 @@ - + - + @@ -10643,7 +10643,7 @@ - + @@ -10727,7 +10727,7 @@ - + @@ -10804,7 +10804,7 @@ - + @@ -12490,7 +12490,7 @@ - + @@ -14944,7 +14944,7 @@ - + @@ -15140,7 +15140,7 @@ - + @@ -16460,7 +16460,7 @@ - + @@ -16700,7 +16700,7 @@ - + @@ -16739,7 +16739,7 @@ - + @@ -16771,7 +16771,7 @@ - + @@ -16823,14 +16823,14 @@ - + - + @@ -16863,7 +16863,7 @@ - + @@ -16925,7 +16925,7 @@ - + @@ -16978,7 +16978,7 @@ - + diff --git a/tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi b/tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi index 1f80242f..5c5dad86 100644 --- a/tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi +++ b/tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi @@ -1447,7 +1447,7 @@ - + @@ -2404,7 +2404,7 @@ - + @@ -2511,7 +2511,7 @@ - + @@ -4964,7 +4964,7 @@ - + @@ -5124,7 +5124,7 @@ - + @@ -5142,7 +5142,7 @@ - + diff --git a/tests/data/test-annotate/test21-pr19092.so.abi b/tests/data/test-annotate/test21-pr19092.so.abi index f36a4e59..819a8790 100644 --- a/tests/data/test-annotate/test21-pr19092.so.abi +++ b/tests/data/test-annotate/test21-pr19092.so.abi @@ -2100,7 +2100,7 @@ - + @@ -5176,7 +5176,7 @@ - + @@ -7672,7 +7672,7 @@ - + @@ -7681,7 +7681,7 @@ - + diff --git a/tests/data/test-diff-dwarf-abixml/PR25409-librte_bus_dpaa.so.20.0.abi b/tests/data/test-diff-dwarf-abixml/PR25409-librte_bus_dpaa.so.20.0.abi index c72543d7..44cf3bcc 100644 --- a/tests/data/test-diff-dwarf-abixml/PR25409-librte_bus_dpaa.so.20.0.abi +++ b/tests/data/test-diff-dwarf-abixml/PR25409-librte_bus_dpaa.so.20.0.abi @@ -434,7 +434,7 @@ - + @@ -2957,7 +2957,7 @@ - + @@ -3018,7 +3018,7 @@ - + @@ -5152,7 +5152,7 @@ - + @@ -5187,14 +5187,14 @@ - + - + @@ -5351,7 +5351,7 @@ - + @@ -5557,7 +5557,7 @@ - + @@ -5586,7 +5586,7 @@ - + diff --git a/tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1.abi b/tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1.abi index 4493e031..9939e75e 100644 --- a/tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1.abi +++ b/tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1.abi @@ -4305,7 +4305,7 @@ - + @@ -4313,7 +4313,7 @@ - + @@ -4796,13 +4796,13 @@ - + - + @@ -7194,7 +7194,7 @@ - + @@ -7396,7 +7396,7 @@ - + @@ -7404,7 +7404,7 @@ - + diff --git a/tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt b/tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt index 18f8a6b7..d028d6cb 100644 --- a/tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt +++ b/tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt @@ -571,6 +571,11 @@ 7 data member changes: type of 'void (* pixel_converter)(uint8_t*, uint8_t*)' changed: in pointed to type 'function type void (uint8_t*, uint8_t*)': + parameter 1 of type 'uint8_t*' changed: + in pointed to type 'typedef uint8_t': + entity changed from 'typedef uint8_t' to compatible type 'void' + type name changed from 'unsigned char' to 'void' + type size changed from 8 to 0 (in bits) 'MJpegEncoderRateControl rate_control' offset changed from 5824 to 5760 (in bits) (by -64 bits) 'MJpegEncoderRateControlCbs cbs' offset changed from 7680 to 7616 (in bits) (by -64 bits) 'void* cbs_opaque' offset changed from 7872 to 7808 (in bits) (by -64 bits) diff --git a/tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi b/tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi index 2a8abbb7..dbd1e87c 100644 --- a/tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi +++ b/tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi @@ -1377,7 +1377,7 @@ - + diff --git a/tests/data/test-read-dwarf/PR22122-libftdc.so.abi b/tests/data/test-read-dwarf/PR22122-libftdc.so.abi index 2cd5ead5..387bbd82 100644 --- a/tests/data/test-read-dwarf/PR22122-libftdc.so.abi +++ b/tests/data/test-read-dwarf/PR22122-libftdc.so.abi @@ -1974,14 +1974,14 @@ - + - + diff --git a/tests/data/test-read-dwarf/PR25007-sdhci.ko.abi b/tests/data/test-read-dwarf/PR25007-sdhci.ko.abi index b13611f1..7b6be7ad 100644 --- a/tests/data/test-read-dwarf/PR25007-sdhci.ko.abi +++ b/tests/data/test-read-dwarf/PR25007-sdhci.ko.abi @@ -9489,7 +9489,7 @@ - + @@ -9503,7 +9503,7 @@ - + @@ -9593,7 +9593,7 @@ - + @@ -9661,7 +9661,7 @@ - + @@ -9670,7 +9670,7 @@ - + @@ -9682,7 +9682,7 @@ - + @@ -9942,7 +9942,7 @@ - + @@ -9969,7 +9969,7 @@ - + @@ -10001,7 +10001,7 @@ - + @@ -10877,7 +10877,7 @@ - + @@ -10899,7 +10899,7 @@ - + @@ -11066,7 +11066,7 @@ - + @@ -11356,7 +11356,7 @@ - + @@ -11372,7 +11372,7 @@ - + @@ -11416,7 +11416,7 @@ - + @@ -11473,7 +11473,7 @@ - + diff --git a/tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi b/tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi index b9f9eb70..067b67cf 100644 --- a/tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi +++ b/tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi @@ -148,7 +148,7 @@ - + @@ -200,7 +200,7 @@ - + @@ -480,7 +480,7 @@ - + @@ -670,11 +670,11 @@ - + - + @@ -719,7 +719,7 @@ - + @@ -861,7 +861,7 @@ - + @@ -893,7 +893,7 @@ - + @@ -928,7 +928,7 @@ - + @@ -957,7 +957,7 @@ - + @@ -985,29 +985,29 @@ - + - + - + - + - + @@ -1076,7 +1076,7 @@ - + diff --git a/tests/data/test-read-dwarf/test-libaaudio.so.abi b/tests/data/test-read-dwarf/test-libaaudio.so.abi index 2e815cb7..50f9f251 100644 --- a/tests/data/test-read-dwarf/test-libaaudio.so.abi +++ b/tests/data/test-read-dwarf/test-libaaudio.so.abi @@ -237,8 +237,8 @@ - - + + @@ -287,7 +287,7 @@ - + @@ -326,7 +326,7 @@ - + @@ -352,18 +352,18 @@ - + - + - + - + @@ -416,7 +416,7 @@ - + @@ -424,57 +424,57 @@ - + - + - + - + - + - + - + - + - + - + - + @@ -484,7 +484,7 @@ - + @@ -494,7 +494,7 @@ - + @@ -511,7 +511,7 @@ - + @@ -525,27 +525,27 @@ - + - + - + - + - + - + @@ -570,23 +570,23 @@ - + - + - + - + - + @@ -595,51 +595,51 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -647,15 +647,15 @@ - + - + - + @@ -692,7 +692,7 @@ - + @@ -704,7 +704,7 @@ - + diff --git a/tests/data/test-read-dwarf/test-libandroid.so.abi b/tests/data/test-read-dwarf/test-libandroid.so.abi index 585513a9..e4503a14 100644 --- a/tests/data/test-read-dwarf/test-libandroid.so.abi +++ b/tests/data/test-read-dwarf/test-libandroid.so.abi @@ -1042,7 +1042,7 @@ - + @@ -1065,12 +1065,12 @@ - + - + @@ -1098,44 +1098,44 @@ - + - + - + - + - + - + - + @@ -1144,13 +1144,13 @@ - + - + @@ -1726,7 +1726,7 @@ - + @@ -1734,12 +1734,12 @@ - + - + @@ -1984,40 +1984,40 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -2029,646 +2029,646 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -2963,7 +2963,7 @@ - + @@ -2983,7 +2983,7 @@ - + @@ -3699,164 +3699,164 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + @@ -4350,68 +4350,68 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + @@ -10298,7 +10298,7 @@ - + @@ -10318,19 +10318,19 @@ - + - + - + - + @@ -10369,13 +10369,13 @@ - + - + @@ -10386,50 +10386,50 @@ - + - + - + - + - + - + - + - + @@ -10437,7 +10437,7 @@ - + @@ -10445,7 +10445,7 @@ - + @@ -10453,78 +10453,78 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -10532,7 +10532,7 @@ - + @@ -10540,7 +10540,7 @@ - + @@ -10548,72 +10548,72 @@ - + - + - + - + - + - + - + - + - + - + - + @@ -10621,7 +10621,7 @@ - + @@ -10629,7 +10629,7 @@ - + @@ -10637,50 +10637,50 @@ - + - + - + - + - + - + - + - + @@ -10688,44 +10688,44 @@ - + - + - + - + - + - + - + @@ -10733,7 +10733,7 @@ - + @@ -10741,7 +10741,7 @@ - + @@ -10749,84 +10749,84 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -10834,7 +10834,7 @@ - + @@ -10842,7 +10842,7 @@ - + @@ -10850,109 +10850,109 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -10960,7 +10960,7 @@ - + @@ -10968,7 +10968,7 @@ - + @@ -10976,82 +10976,82 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -11059,7 +11059,7 @@ - + @@ -11067,7 +11067,7 @@ - + @@ -11075,108 +11075,108 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -11184,7 +11184,7 @@ - + @@ -11192,7 +11192,7 @@ - + @@ -11200,85 +11200,85 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -11286,7 +11286,7 @@ - + @@ -11294,7 +11294,7 @@ - + @@ -11302,70 +11302,70 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -11379,21 +11379,21 @@ - + - + - + @@ -11401,7 +11401,7 @@ - + @@ -11409,14 +11409,14 @@ - + - + @@ -11424,7 +11424,7 @@ - + @@ -11432,14 +11432,14 @@ - + - + @@ -11447,7 +11447,7 @@ - + @@ -11455,98 +11455,98 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -11554,7 +11554,7 @@ - + @@ -11562,14 +11562,14 @@ - + - + @@ -11577,7 +11577,7 @@ - + @@ -11585,14 +11585,14 @@ - + - + @@ -11600,7 +11600,7 @@ - + @@ -11608,14 +11608,14 @@ - + - + @@ -11623,7 +11623,7 @@ - + @@ -11631,12 +11631,12 @@ - + - + @@ -11644,7 +11644,7 @@ - + @@ -11652,7 +11652,7 @@ - + @@ -11660,105 +11660,105 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -11766,7 +11766,7 @@ - + @@ -11774,19 +11774,19 @@ - + - + - + @@ -11794,7 +11794,7 @@ - + @@ -11802,18 +11802,18 @@ - + - + - + @@ -11826,7 +11826,7 @@ - + @@ -11965,8 +11965,8 @@ - - + + @@ -12474,7 +12474,7 @@ - + @@ -12488,12 +12488,12 @@ - + - + @@ -12957,11 +12957,11 @@ - + - + @@ -12985,11 +12985,11 @@ - + - + @@ -13088,7 +13088,7 @@ - + @@ -13310,7 +13310,7 @@ - + @@ -14373,7 +14373,7 @@ - + @@ -16791,7 +16791,7 @@ - + @@ -17041,7 +17041,7 @@ - + @@ -17139,7 +17139,7 @@ - + @@ -17174,7 +17174,7 @@ - + @@ -17186,7 +17186,7 @@ - + @@ -23555,7 +23555,7 @@ - + @@ -23569,7 +23569,7 @@ - + @@ -23677,7 +23677,7 @@ - + @@ -23773,7 +23773,7 @@ - + @@ -26288,7 +26288,7 @@ - + @@ -26334,17 +26334,17 @@ - + - + - + @@ -26366,7 +26366,7 @@ - + diff --git a/tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi b/tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi index db5aaa04..c8f2d7c7 100644 --- a/tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi +++ b/tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi @@ -2638,7 +2638,7 @@ - + @@ -2711,7 +2711,7 @@ - + @@ -2763,7 +2763,7 @@ - + @@ -4244,7 +4244,7 @@ - + @@ -4255,7 +4255,7 @@ - + diff --git a/tests/data/test-read-dwarf/test11-pr18828.so.abi b/tests/data/test-read-dwarf/test11-pr18828.so.abi index f310b759..32bf5bb1 100644 --- a/tests/data/test-read-dwarf/test11-pr18828.so.abi +++ b/tests/data/test-read-dwarf/test11-pr18828.so.abi @@ -7076,7 +7076,7 @@ - + @@ -7309,7 +7309,7 @@ - + diff --git a/tests/data/test-read-dwarf/test12-pr18844.so.abi b/tests/data/test-read-dwarf/test12-pr18844.so.abi index 1702be09..6676461e 100644 --- a/tests/data/test-read-dwarf/test12-pr18844.so.abi +++ b/tests/data/test-read-dwarf/test12-pr18844.so.abi @@ -11394,7 +11394,7 @@ - + @@ -11478,7 +11478,7 @@ - + @@ -13869,11 +13869,11 @@ - + - + @@ -13889,7 +13889,7 @@ - + @@ -13901,7 +13901,7 @@ - + @@ -13913,15 +13913,15 @@ - + - + - + @@ -13933,39 +13933,39 @@ - + - + - + - + - + - + - + - + - + @@ -13977,35 +13977,35 @@ - + - + - + - + - + - + - + - + @@ -14248,7 +14248,7 @@ - + @@ -14584,13 +14584,13 @@ - + - + @@ -19097,7 +19097,7 @@ - + @@ -19577,7 +19577,7 @@ - + @@ -19585,15 +19585,15 @@ - + - + - + diff --git a/tests/data/test-read-dwarf/test13-pr18894.so.abi b/tests/data/test-read-dwarf/test13-pr18894.so.abi index 92f8a170..26346cda 100644 --- a/tests/data/test-read-dwarf/test13-pr18894.so.abi +++ b/tests/data/test-read-dwarf/test13-pr18894.so.abi @@ -521,7 +521,7 @@ - + @@ -1396,7 +1396,7 @@ - + @@ -1405,7 +1405,7 @@ - + @@ -1414,7 +1414,7 @@ - + @@ -2322,7 +2322,7 @@ - + diff --git a/tests/data/test-read-dwarf/test14-pr18893.so.abi b/tests/data/test-read-dwarf/test14-pr18893.so.abi index 0677ec92..ec1ae1d2 100644 --- a/tests/data/test-read-dwarf/test14-pr18893.so.abi +++ b/tests/data/test-read-dwarf/test14-pr18893.so.abi @@ -4517,7 +4517,7 @@ - + @@ -4605,7 +4605,7 @@ - + diff --git a/tests/data/test-read-dwarf/test15-pr18892.so.abi b/tests/data/test-read-dwarf/test15-pr18892.so.abi index 05ceb7a4..696f3209 100644 --- a/tests/data/test-read-dwarf/test15-pr18892.so.abi +++ b/tests/data/test-read-dwarf/test15-pr18892.so.abi @@ -1623,7 +1623,7 @@ - + @@ -1767,10 +1767,10 @@ - + - + @@ -1827,7 +1827,7 @@ - + @@ -2299,19 +2299,19 @@ - + - + - + @@ -2322,17 +2322,17 @@ - + - + - + @@ -2344,7 +2344,7 @@ - + @@ -2965,7 +2965,7 @@ - + @@ -3581,7 +3581,7 @@ - + @@ -3600,10 +3600,10 @@ - + - + @@ -3611,7 +3611,7 @@ - + @@ -3959,7 +3959,7 @@ - + @@ -4666,12 +4666,12 @@ - + - - + + @@ -4830,7 +4830,7 @@ - + @@ -4855,23 +4855,23 @@ - + - + - + - + @@ -4887,13 +4887,13 @@ - + - + @@ -4905,8 +4905,8 @@ - - + + @@ -4939,7 +4939,7 @@ - + @@ -5274,7 +5274,7 @@ - + @@ -5312,14 +5312,14 @@ - + - + @@ -5332,7 +5332,7 @@ - + @@ -5352,7 +5352,7 @@ - + @@ -5372,7 +5372,7 @@ - + @@ -5508,7 +5508,7 @@ - + @@ -5551,7 +5551,7 @@ - + @@ -5705,7 +5705,7 @@ - + @@ -5932,11 +5932,11 @@ - + - + @@ -5950,11 +5950,11 @@ - + - + @@ -10739,11 +10739,11 @@ - + - + @@ -10752,7 +10752,7 @@ - + @@ -10762,7 +10762,7 @@ - + @@ -10774,7 +10774,7 @@ - + @@ -10797,11 +10797,11 @@ - + - + @@ -10815,7 +10815,7 @@ - + @@ -10834,19 +10834,19 @@ - + - + - + - + @@ -11002,7 +11002,7 @@ - + @@ -11020,7 +11020,7 @@ - + @@ -11068,7 +11068,7 @@ - + @@ -11077,11 +11077,11 @@ - + - + @@ -11095,19 +11095,19 @@ - + - + - + - + @@ -11116,15 +11116,15 @@ - + - + - + @@ -11133,11 +11133,11 @@ - + - + @@ -11146,11 +11146,11 @@ - + - + @@ -11160,17 +11160,17 @@ - + - + - + @@ -11185,15 +11185,15 @@ - + - + - + @@ -11202,7 +11202,7 @@ - + @@ -11299,7 +11299,7 @@ - + @@ -11325,11 +11325,11 @@ - + - + @@ -11346,13 +11346,13 @@ - + - + @@ -11363,19 +11363,19 @@ - + - + - + - + @@ -11393,20 +11393,20 @@ - + - + - + @@ -11428,7 +11428,7 @@ - + @@ -11446,7 +11446,7 @@ - + @@ -11454,7 +11454,7 @@ - + @@ -11495,7 +11495,7 @@ - + @@ -11531,14 +11531,14 @@ - + - + - + @@ -12184,7 +12184,7 @@ - + @@ -12210,14 +12210,14 @@ - + - + @@ -12573,7 +12573,7 @@ - + @@ -12660,7 +12660,7 @@ - + @@ -12720,7 +12720,7 @@ - + @@ -12758,7 +12758,7 @@ - + @@ -12783,7 +12783,7 @@ - + @@ -12891,7 +12891,7 @@ - + @@ -12912,7 +12912,7 @@ - + @@ -12958,13 +12958,13 @@ - + - + @@ -13067,7 +13067,7 @@ - + @@ -13395,7 +13395,7 @@ - + @@ -15040,20 +15040,20 @@ - + - + - + - + @@ -15064,19 +15064,19 @@ - + - + - + - + @@ -15085,7 +15085,7 @@ - + @@ -16357,7 +16357,7 @@ - + diff --git a/tests/data/test-read-dwarf/test16-pr18904.so.abi b/tests/data/test-read-dwarf/test16-pr18904.so.abi index 74e8af11..21fb1c8a 100644 --- a/tests/data/test-read-dwarf/test16-pr18904.so.abi +++ b/tests/data/test-read-dwarf/test16-pr18904.so.abi @@ -2745,7 +2745,7 @@ - + @@ -6860,7 +6860,7 @@ - + @@ -6934,7 +6934,7 @@ - + @@ -6974,7 +6974,7 @@ - + @@ -6986,7 +6986,7 @@ - + @@ -10280,7 +10280,7 @@ - + @@ -13419,7 +13419,7 @@ - + @@ -13452,7 +13452,7 @@ - + @@ -15675,13 +15675,13 @@ - + - + @@ -15699,7 +15699,7 @@ - + @@ -16385,13 +16385,13 @@ - + - + - + @@ -16676,7 +16676,7 @@ - + @@ -16691,7 +16691,7 @@ - + @@ -17429,7 +17429,7 @@ - + @@ -17700,10 +17700,10 @@ - + - + diff --git a/tests/data/test-read-dwarf/test17-pr19027.so.abi b/tests/data/test-read-dwarf/test17-pr19027.so.abi index 51d416ea..44264fca 100644 --- a/tests/data/test-read-dwarf/test17-pr19027.so.abi +++ b/tests/data/test-read-dwarf/test17-pr19027.so.abi @@ -1114,7 +1114,7 @@ - + @@ -1238,7 +1238,7 @@ - + @@ -1397,7 +1397,7 @@ - + @@ -2613,21 +2613,21 @@ - + - + - + @@ -8722,7 +8722,7 @@ - + @@ -9585,7 +9585,7 @@ - + @@ -9783,7 +9783,7 @@ - + @@ -9817,7 +9817,7 @@ - + diff --git a/tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi b/tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi index 36588426..a6c5705e 100644 --- a/tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi +++ b/tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi @@ -4147,14 +4147,14 @@ - + - + @@ -5672,14 +5672,14 @@ - + - + @@ -5963,7 +5963,7 @@ - + @@ -5973,7 +5973,7 @@ - + diff --git a/tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi b/tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi index 61e52caa..9e394444 100644 --- a/tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi +++ b/tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi @@ -1581,7 +1581,7 @@ - + @@ -1653,7 +1653,7 @@ - + @@ -1965,7 +1965,7 @@ - + @@ -2343,7 +2343,7 @@ - + @@ -2513,11 +2513,11 @@ - + - + @@ -4725,7 +4725,7 @@ - + @@ -5071,7 +5071,7 @@ - + @@ -5129,7 +5129,7 @@ - + @@ -6057,7 +6057,7 @@ - + @@ -6312,11 +6312,11 @@ - + - + @@ -6392,7 +6392,7 @@ - + @@ -6439,7 +6439,7 @@ - + @@ -6481,7 +6481,7 @@ - + @@ -7561,7 +7561,7 @@ - + @@ -9076,7 +9076,7 @@ - + @@ -9205,7 +9205,7 @@ - + @@ -10113,7 +10113,7 @@ - + @@ -10272,7 +10272,7 @@ - + @@ -10294,7 +10294,7 @@ - + @@ -10312,7 +10312,7 @@ - + @@ -10341,11 +10341,11 @@ - + - + @@ -10364,7 +10364,7 @@ - + @@ -10402,7 +10402,7 @@ - + @@ -10432,7 +10432,7 @@ - + diff --git a/tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi b/tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi index a2a36b06..ddaf2f23 100644 --- a/tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi +++ b/tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi @@ -826,7 +826,7 @@ - + @@ -1420,7 +1420,7 @@ - + @@ -1487,7 +1487,7 @@ - + @@ -2929,7 +2929,7 @@ - + @@ -3018,7 +3018,7 @@ - + @@ -3028,7 +3028,7 @@ - + diff --git a/tests/data/test-read-dwarf/test21-pr19092.so.abi b/tests/data/test-read-dwarf/test21-pr19092.so.abi index 5ef234a5..52dc04e8 100644 --- a/tests/data/test-read-dwarf/test21-pr19092.so.abi +++ b/tests/data/test-read-dwarf/test21-pr19092.so.abi @@ -1271,7 +1271,7 @@ - + @@ -3382,7 +3382,7 @@ - + @@ -5077,12 +5077,12 @@ - + - + diff --git a/tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi b/tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi index c64c78cf..fcc8f506 100644 --- a/tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi +++ b/tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi @@ -4754,11 +4754,11 @@ - + - + @@ -5395,7 +5395,7 @@ - + @@ -5538,11 +5538,11 @@ - + - + @@ -5553,7 +5553,7 @@ - + @@ -11058,7 +11058,7 @@ - + @@ -11122,7 +11122,7 @@ - + @@ -11136,7 +11136,7 @@ - + @@ -11342,7 +11342,7 @@ - + @@ -11406,7 +11406,7 @@ - + @@ -11624,7 +11624,7 @@ - + @@ -12031,7 +12031,7 @@ - + @@ -12099,7 +12099,7 @@ - + @@ -12144,7 +12144,7 @@ - + @@ -12496,7 +12496,7 @@ - + @@ -12960,25 +12960,25 @@ - + - + - + - + @@ -12999,7 +12999,7 @@ - + @@ -13099,14 +13099,14 @@ - + - + @@ -13184,7 +13184,7 @@ - + @@ -13198,13 +13198,13 @@ - + - + @@ -13314,7 +13314,7 @@ - + @@ -13453,14 +13453,14 @@ - + - + @@ -13538,7 +13538,7 @@ - + @@ -14150,7 +14150,7 @@ - + @@ -14244,7 +14244,7 @@ - + @@ -14475,7 +14475,7 @@ - + @@ -14746,7 +14746,7 @@ - + @@ -14877,7 +14877,7 @@ - + @@ -14893,7 +14893,7 @@ - + @@ -14909,7 +14909,7 @@ - + @@ -14919,7 +14919,7 @@ - + @@ -14929,7 +14929,7 @@ - + @@ -14945,7 +14945,7 @@ - + @@ -14970,7 +14970,7 @@ - + @@ -14984,7 +14984,7 @@ - + @@ -15099,7 +15099,7 @@ - + @@ -15136,7 +15136,7 @@ - + @@ -21011,7 +21011,7 @@ - + @@ -22644,7 +22644,7 @@ - + @@ -23246,7 +23246,7 @@ - + @@ -23682,7 +23682,7 @@ - + @@ -23697,7 +23697,7 @@ - + @@ -23712,7 +23712,7 @@ - + @@ -23848,12 +23848,12 @@ - + - + @@ -24489,7 +24489,7 @@ - + @@ -24499,7 +24499,7 @@ - + @@ -24571,7 +24571,7 @@ - + @@ -24582,7 +24582,7 @@ - + @@ -24593,7 +24593,7 @@ - + @@ -24604,7 +24604,7 @@ - + @@ -24615,7 +24615,7 @@ - + @@ -24626,7 +24626,7 @@ - + @@ -24637,7 +24637,7 @@ - + @@ -24648,7 +24648,7 @@ - + @@ -24659,7 +24659,7 @@ - + @@ -24670,7 +24670,7 @@ - + @@ -24681,7 +24681,7 @@ - + @@ -24799,7 +24799,7 @@ - + @@ -24810,7 +24810,7 @@ - + @@ -24821,7 +24821,7 @@ - + @@ -24832,7 +24832,7 @@ - + @@ -24843,7 +24843,7 @@ - + @@ -24854,7 +24854,7 @@ - + @@ -24928,7 +24928,7 @@ - + @@ -24939,7 +24939,7 @@ - + @@ -24950,7 +24950,7 @@ - + @@ -24961,7 +24961,7 @@ - + @@ -24972,7 +24972,7 @@ - + @@ -24983,7 +24983,7 @@ - + @@ -24994,7 +24994,7 @@ - + @@ -25005,7 +25005,7 @@ - + @@ -25016,7 +25016,7 @@ - + @@ -25027,7 +25027,7 @@ - + @@ -25038,7 +25038,7 @@ - + @@ -25156,7 +25156,7 @@ - + @@ -25167,7 +25167,7 @@ - + @@ -25178,7 +25178,7 @@ - + @@ -25189,7 +25189,7 @@ - + @@ -25200,7 +25200,7 @@ - + @@ -25211,7 +25211,7 @@ - + @@ -25425,7 +25425,7 @@ - + @@ -25435,7 +25435,7 @@ - + @@ -25445,7 +25445,7 @@ - + @@ -25455,7 +25455,7 @@ - + @@ -25484,7 +25484,7 @@ - + @@ -25534,7 +25534,7 @@ - + @@ -25544,7 +25544,7 @@ - + @@ -25554,7 +25554,7 @@ - + @@ -25723,7 +25723,7 @@ - + @@ -25733,7 +25733,7 @@ - + @@ -25743,7 +25743,7 @@ - + @@ -25753,7 +25753,7 @@ - + @@ -25782,7 +25782,7 @@ - + @@ -25832,7 +25832,7 @@ - + @@ -25842,7 +25842,7 @@ - + @@ -25852,7 +25852,7 @@ - + @@ -26085,7 +26085,7 @@ - + @@ -26094,7 +26094,7 @@ - + @@ -26103,7 +26103,7 @@ - + @@ -26112,7 +26112,7 @@ - + @@ -26121,7 +26121,7 @@ - + @@ -26130,7 +26130,7 @@ - + @@ -26139,7 +26139,7 @@ - + @@ -26148,7 +26148,7 @@ - + @@ -26157,7 +26157,7 @@ - + @@ -26166,7 +26166,7 @@ - + @@ -26175,7 +26175,7 @@ - + @@ -26184,7 +26184,7 @@ - + @@ -26193,7 +26193,7 @@ - + @@ -26202,7 +26202,7 @@ - + @@ -26211,7 +26211,7 @@ - + @@ -26220,7 +26220,7 @@ - + @@ -26229,7 +26229,7 @@ - + @@ -26238,7 +26238,7 @@ - + @@ -26247,7 +26247,7 @@ - + @@ -26256,7 +26256,7 @@ - + @@ -26265,7 +26265,7 @@ - + @@ -26274,7 +26274,7 @@ - + @@ -26411,7 +26411,7 @@ - + @@ -26419,7 +26419,7 @@ - + @@ -26427,7 +26427,7 @@ - + @@ -26435,7 +26435,7 @@ - + @@ -26461,7 +26461,7 @@ - + @@ -26469,7 +26469,7 @@ - + @@ -26477,7 +26477,7 @@ - + @@ -26485,7 +26485,7 @@ - + @@ -26493,7 +26493,7 @@ - + @@ -26501,7 +26501,7 @@ - + @@ -26509,7 +26509,7 @@ - + @@ -26517,7 +26517,7 @@ - + @@ -26543,7 +26543,7 @@ - + @@ -26551,7 +26551,7 @@ - + @@ -26559,7 +26559,7 @@ - + @@ -26567,7 +26567,7 @@ - + @@ -26838,7 +26838,7 @@ - + @@ -26896,7 +26896,7 @@ - + @@ -27154,7 +27154,7 @@ - + @@ -27210,7 +27210,7 @@ - + @@ -27646,7 +27646,7 @@ - + @@ -27999,7 +27999,7 @@ - + @@ -28014,7 +28014,7 @@ - + @@ -28439,7 +28439,7 @@ - + @@ -28497,7 +28497,7 @@ - + @@ -28556,7 +28556,7 @@ - + @@ -28568,7 +28568,7 @@ - + @@ -28728,7 +28728,7 @@ - + @@ -28739,7 +28739,7 @@ - + @@ -28808,7 +28808,7 @@ - + @@ -28889,7 +28889,7 @@ - + @@ -28989,7 +28989,7 @@ - + @@ -29070,7 +29070,7 @@ - + @@ -29234,7 +29234,7 @@ - + @@ -29245,7 +29245,7 @@ - + @@ -29256,7 +29256,7 @@ - + @@ -29267,7 +29267,7 @@ - + @@ -29278,7 +29278,7 @@ - + @@ -29470,7 +29470,7 @@ - +