From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 956F43858400 for ; Mon, 5 Sep 2022 16:32:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 956F43858400 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662395562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=iFHbGSWIjEcBqgkGGRkmocI0SWcvTetvgJJXF5uqWHo=; b=GAQar63kAHRwCSb45xhXsEqJyqKuRJjg/ldMov/Yqf4+xm4JrROAVE1UEauOnJTHXddfwg egbkKv2gc/GhEWP0/DbbNVROQwr+ZpW4/cjWTrSLHLqL0xlQ3CnZNNCQEP1e5jv5fLIMKG 2nKdAV0+F9Ob04231A1CXHud8bG5JR0= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-628-3OGCzd6jNhqM4dAw5zsvHg-1; Mon, 05 Sep 2022 12:32:39 -0400 X-MC-Unique: 3OGCzd6jNhqM4dAw5zsvHg-1 Received: by mail-qt1-f197.google.com with SMTP id v5-20020ac873c5000000b003434ef0a8c7so7241882qtp.21 for ; Mon, 05 Sep 2022 09:32:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:organization:subject:to :from:x-gm-message-state:from:to:cc:subject:date; bh=iFHbGSWIjEcBqgkGGRkmocI0SWcvTetvgJJXF5uqWHo=; b=pubtDwHKAmUk0CdDjD/3vMA+eRxWJKUJ5PrRWDcUKIKeW9W38zaHF3WT0MssPRFzJx FRtxk94nl3zccXdc60bsngj9eL0NgEVuU4cd6rNbZ3IJOwWkp+Cw6eMV1JRSdLhqAmgC Dmgy2nDlcdt7YTmqp/98cl2OVgGYvUyfmEWwxG5RDtVktzbmYG5YMZb1AbQes5+RbWGF zeoLs9zH/oGYKa0OJMGvPDWXJx5L7MVDF08LUXK+hn4n/6IEuwFiqGM070VzH4QEeP8j cAI14MeApoaX5/GhwZVPU5QaubiTv3WdCOZojC2zEws8m0XikpCO6r3MFPlSTZKGHJH1 DBVw== X-Gm-Message-State: ACgBeo1PpUBu+Hut0y4jkf34uh4GWAw4Tp8L6jxl77pTrs7DvpWFNXdj IEsz4L1jS4K5+HjqNXz5xKYWjSgD0SoLT11l2s4eTbEso4zHl/IVTS5u5MTqXqssvFSgzLuZH7k nxmY8ipHgM777882oUV8RE/ODtxI4+a6IKHNuqqzSjTds5VvF7X27+YFewN/nwaldD2uS X-Received: by 2002:a05:6214:1cc8:b0:46e:1920:70f8 with SMTP id g8-20020a0562141cc800b0046e192070f8mr39931391qvd.6.1662395558306; Mon, 05 Sep 2022 09:32:38 -0700 (PDT) X-Google-Smtp-Source: AA6agR68GpRgfyY1kI03PSQogMOxydZijK4pwePnBsOXAAbLHHXpyvxate2c4g47hWrO32oqAYTOWw== X-Received: by 2002:a05:6214:1cc8:b0:46e:1920:70f8 with SMTP id g8-20020a0562141cc800b0046e192070f8mr39931307qvd.6.1662395557148; Mon, 05 Sep 2022 09:32:37 -0700 (PDT) Received: from localhost ([88.120.130.27]) by smtp.gmail.com with ESMTPSA id d19-20020ac84e33000000b00342f7beccd0sm7296692qtw.45.2022.09.05.09.32.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Sep 2022 09:32:36 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id DB1095802BD; Mon, 5 Sep 2022 18:32:34 +0200 (CEST) From: Dodji Seketeli To: libabigail@sourceware.org Subject: [PATCH, applied] dwarf-reader: Simplify the canonicalization decision of types added to IR Organization: Red Hat / France X-Operating-System: Fedora 38 X-URL: http://www.redhat.com Date: Mon, 05 Sep 2022 18:32:34 +0200 Message-ID: <878rmxkcil.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-11.8 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,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 List-Id: Hello, This is a long overdue clean-up. Back in the day when we had no DWARF type DIE canonicalization, there could be a LOT of IR types to be canonicalized. To store set of those types to be canonicalized, we the used the already existing association type DIE offset -> IR types that we had, and so we only had to store the DIE offsets of the IR types that we wanted to canonicalize. At canonicalization time, we'd walk the set of DIE offsets we stored on the side, use the association type DIE offset -> IR types to retrieve the IR type to canonicalize and we'd canonicalize it. This is somewhat complicated. Now that we have DWARF DIEs canonicalization, the number of IR types dropped significantly so this complicated scheme is no more warranted. So this patch drops that indirection and stores the IR types to be canonicalize into a vector of IR types and that's it. Yay, less code. * src/abg-dwarf-reader.cc (maybe_canonicalize_type): Remove the overload that takes a Dwarf_Die* parameter. (operator++(die_source& source)): Likewise. (read_context::{types_to_canonicalize_, alt_types_to_canonicalize_, type_unit_types_to_canonicalize_}): Remove these data members of type vector. (read_context::initialize): Remove invocations to alt_types_to_canonicalize_.clear(), type_unit_types_to_canonicalize_.clear(), and extra_types_to_canonicalize_.clear(). (read_context::extra_types_to_canonicalize_): Rename this into read_context::types_to_canonicalize_, of type vector. (read_context::types_to_canonicalize): Remove these member functions that take a parameter of type die_source. (read_context::extra_types_to_canonicalize): Rename this function into types_to_canonicalize. It returns a type const vector&. (read_context::schedule_type_for_late_canonicalization): Remove this overload that takes a type const Dwarf_Die*. In the overload that takes a parameter const type_base_sptr however, rename the invocation to extra_types_to_canonicalize_.push_back(t) into types_to_canonicalize_.push_back(t). (read_context::canonicalize_types_scheduled): This doesn't take a die_source parameter anymore. It now only cycles through the types retrieved by types_to_canonicalize() to canonicalize them. (read_context::add_late_canonicalized_types_stats): Remove the die_source parameter. Use types_to_canonicalize(). (read_context::perform_late_type_canonicalizing): Just call read_context::canonicalize_types_scheduled(). (build_ir_node_from_die): Adjust calls to maybe_canonicalize_type. Also, really canonicalize the function type when a function decl is constructed. * tests/data/test-annotate/test13-pr18894.so.abi: Adjust. * tests/data/test-annotate/test15-pr18892.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-pkg/nss-3.23.0-1.0.fc23.x86_64-report-0.txt: Likewise. * tests/data/test-read-dwarf/PR22122-libftdc.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/test15-pr18892.so.abi: Likewise. * tests/data/test-read-dwarf/test16-pr18904.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. Signed-off-by: Dodji Seketeli Applied to master. --- src/abg-dwarf-reader.cc | 300 ++---------------- .../data/test-annotate/test13-pr18894.so.abi | 36 +-- .../data/test-annotate/test15-pr18892.so.abi | 74 ++--- ...st20-pr19025-libvtkParallelCore-6.1.so.abi | 10 +- .../data/test-annotate/test21-pr19092.so.abi | 36 +-- .../nss-3.23.0-1.0.fc23.x86_64-report-0.txt | 4 +- .../test-read-dwarf/PR22122-libftdc.so.abi | 34 +- .../test-read-dwarf/test12-pr18844.so.abi | 6 +- .../test-read-dwarf/test13-pr18894.so.abi | 20 +- .../test-read-dwarf/test15-pr18892.so.abi | 40 +-- .../test-read-dwarf/test16-pr18904.so.abi | 10 +- ...st20-pr19025-libvtkParallelCore-6.1.so.abi | 6 +- .../test-read-dwarf/test21-pr19092.so.abi | 20 +- 13 files changed, 179 insertions(+), 417 deletions(-) diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc index 35027c57..56909540 100644 --- a/src/abg-dwarf-reader.cc +++ b/src/abg-dwarf-reader.cc @@ -91,17 +91,6 @@ enum die_source // enumerator }; -/// Prefix increment operator for @ref die_source. -/// -/// @param source the die_source to increment. -/// @return the incremented source. -static die_source& -operator++(die_source& source) -{ - source = static_cast(source + 1); - return source; -} - /// A functor used by @ref dwfl_sptr. struct dwfl_deleter { @@ -519,10 +508,6 @@ die_pretty_print(read_context& ctxt, const Dwarf_Die* die, size_t where_offset); -static void -maybe_canonicalize_type(const Dwarf_Die* die, - read_context& ctxt); - static void maybe_canonicalize_type(const type_base_sptr& t, read_context& ctxt); @@ -2125,10 +2110,7 @@ public: die_function_type_map_type alternate_die_wip_function_types_map_; die_function_type_map_type type_unit_die_wip_function_types_map_; die_function_decl_map_type die_function_with_no_symbol_map_; - vector types_to_canonicalize_; - vector alt_types_to_canonicalize_; - vector type_unit_types_to_canonicalize_; - vector extra_types_to_canonicalize_; + vector types_to_canonicalize_; string_classes_map decl_only_classes_map_; string_enums_map decl_only_enums_map_; die_tu_map_type die_tu_map_; @@ -2274,9 +2256,6 @@ public: type_unit_die_wip_function_types_map_.clear(); die_function_with_no_symbol_map_.clear(); types_to_canonicalize_.clear(); - alt_types_to_canonicalize_.clear(); - type_unit_types_to_canonicalize_.clear(); - extra_types_to_canonicalize_.clear(); decl_only_classes_map_.clear(); die_tu_map_.clear(); cur_corpus_group_.reset(); @@ -4677,38 +4656,6 @@ public: fns_with_no_symbol.clear(); } - /// Return a reference to the vector containing the offsets of the - /// types that need late canonicalizing. - /// - /// @param source whe DIEs referred to by the offsets contained in - /// the vector to return are from. - vector& - types_to_canonicalize(die_source source) - { - switch (source) - { - case PRIMARY_DEBUG_INFO_DIE_SOURCE: - break; - case ALT_DEBUG_INFO_DIE_SOURCE: - return alt_types_to_canonicalize_; - case TYPE_UNIT_DIE_SOURCE: - return type_unit_types_to_canonicalize_; - case NO_DEBUG_INFO_DIE_SOURCE: - case NUMBER_OF_DIE_SOURCES: - ABG_ASSERT_NOT_REACHED; - } - return types_to_canonicalize_; - } - - /// Return a reference to the vector containing the offsets of the - /// types that need late canonicalizing. - /// - /// @param source where the DIEs referred to by the offset in the - /// returned vector are from. - const vector& - types_to_canonicalize(die_source source) const - {return const_cast(this)->types_to_canonicalize(source);} - /// Return a reference to the vector containing the types created /// during the binary analysis but that are not tied to a given /// DWARF DIE. @@ -4717,48 +4664,14 @@ public: /// during the binary analysis but that are not tied to a given /// DWARF DIE. const vector& - extra_types_to_canonicalize() const - {return extra_types_to_canonicalize_;} + types_to_canonicalize() const + {return types_to_canonicalize_;} /// Clear the containers holding types to canonicalize. void clear_types_to_canonicalize() { types_to_canonicalize_.clear(); - alt_types_to_canonicalize_.clear(); - type_unit_types_to_canonicalize_.clear(); - extra_types_to_canonicalize_.clear(); - } - - /// Put the offset of a DIE representing a type on a side vector so - /// that when the reading of the debug info of the current - /// translation unit is done, we can get back to the type DIE and - /// from there, to the type it's associated to, and then - /// canonicalize it. This what we call late canonicalization. - /// - /// @param die the type DIE to schedule for late type - /// canonicalization. - void - schedule_type_for_late_canonicalization(const Dwarf_Die *die) - { - Dwarf_Off o; - - Dwarf_Die equiv_die; - ABG_ASSERT(get_canonical_die(die, equiv_die, - /*where=*/0, - /*die_as_type=*/true)); - - const die_source source = get_die_source(&equiv_die); - o = dwarf_dieoffset(&equiv_die); - - const die_artefact_map_type& m = - type_die_artefact_maps().get_container(*this, die); - - die_artefact_map_type::const_iterator i = m.find(o); - ABG_ASSERT(i != m.end()); - - // Then really do the scheduling. - types_to_canonicalize(source).push_back(o); } /// Types that were created but not tied to a particular DIE, must @@ -4768,7 +4681,7 @@ public: void schedule_type_for_late_canonicalization(const type_base_sptr &t) { - extra_types_to_canonicalize_.push_back(t); + types_to_canonicalize_.push_back(t); } /// Canonicalize types which DIE offsets are stored in vectors on @@ -4778,7 +4691,7 @@ public: /// @param source where the DIE of the types to canonicalize are /// from. void - canonicalize_types_scheduled(die_source source) + canonicalize_types_scheduled() { tools_utils::timer cn_timer; if (do_log()) @@ -4787,74 +4700,38 @@ public: corpus_sptr c = current_corpus(); if (c) cerr << " of corpus " << current_corpus()->get_path(); - cerr << " (DIEs source: " << source << ")\n"; cn_timer.start(); } - if (!types_to_canonicalize(source).empty() - || !extra_types_to_canonicalize().empty()) + if (!types_to_canonicalize().empty()) { tools_utils::timer single_type_cn_timer; - size_t total = types_to_canonicalize(source).size(); + size_t total = types_to_canonicalize().size(); if (do_log()) - cerr << total << " types to canonicalize\n"; - for (size_t i = 0; i < total; ++i) + cerr << total << " Types to canonicalize\n"; + size_t i = 1; + for (vector::const_iterator it = + types_to_canonicalize().begin(); + it != types_to_canonicalize().end(); + ++it, ++i) { - Dwarf_Off element = types_to_canonicalize(source)[i]; - type_base_sptr t = - lookup_type_from_die_offset(element, source); - ABG_ASSERT(t); if (do_log()) { cerr << "canonicalizing type " - << get_pretty_representation(t, false) - << " [" << i + 1 << "/" << total << "]"; + << get_pretty_representation(*it, false) + << " [" << i << "/" << total << "]"; if (corpus_sptr c = current_corpus()) cerr << "@" << c->get_path(); cerr << " ..."; single_type_cn_timer.start(); } - canonicalize(t); + canonicalize(*it); if (do_log()) { - cerr << " DONE"; single_type_cn_timer.stop(); - cerr << ":" <::const_iterator it = - extra_types_to_canonicalize().begin(); - it != extra_types_to_canonicalize().end(); - ++it, ++i) - { - if (do_log()) - { - cerr << "canonicalizing extra type " - << get_pretty_representation(*it, false) - << " [" << i << "/" << total << "]"; - if (corpus_sptr c = current_corpus()) - cerr << "@" << c->get_path(); - cerr << " ..."; - single_type_cn_timer.start(); - } - canonicalize(*it); - if (do_log()) - { - single_type_cn_timer.stop(); - cerr << "DONE:" - << single_type_cn_timer - << "\n"; - } + cerr << "DONE:" + << single_type_cn_timer + << "\n"; } } } @@ -4866,10 +4743,7 @@ public: corpus_sptr c = current_corpus(); if (c) cerr << " of corpus " << current_corpus()->get_path(); - cerr << " (DIEs source: " - << source << "):" - << cn_timer - << "\n"; + cerr << ": (" << cn_timer << ")\n"; } } @@ -4886,16 +4760,11 @@ public: /// canonicalization and which couldn't be canonicalized (for a /// reason) is added to the value already present in this parameter. void - add_late_canonicalized_types_stats(die_source source, - size_t& canonicalized, + add_late_canonicalized_types_stats(size_t& canonicalized, size_t& missed) const { - for (vector::const_iterator i = - types_to_canonicalize(source).begin(); - i != types_to_canonicalize(source).end(); - ++i) + for (auto t : types_to_canonicalize()) { - type_base_sptr t = lookup_type_from_die_offset(*i, source); if (t->get_canonical_type()) ++canonicalized; else @@ -4903,34 +4772,12 @@ public: } } - /// Compute the number of canonicalized and missed types in the late - /// canonicalization phase. - /// - /// @param canonicalized the number of types that got canonicalized - /// is added to the value already present in this parameter. - /// - /// @param missed the number of types scheduled for late - /// canonicalization and which couldn't be canonicalized (for a - /// reason) is added to the value already present in this parameter. - void - add_late_canonicalized_types_stats(size_t& canonicalized, - size_t& missed) const - { - for (die_source source = PRIMARY_DEBUG_INFO_DIE_SOURCE; - source < NUMBER_OF_DIE_SOURCES; - ++source) - add_late_canonicalized_types_stats(source, canonicalized, missed); - } - // Look at the types that need to be canonicalized after the // translation unit has been constructed and canonicalize them. void perform_late_type_canonicalizing() { - for (die_source source = PRIMARY_DEBUG_INFO_DIE_SOURCE; - source < NUMBER_OF_DIE_SOURCES; - ++source) - canonicalize_types_scheduled(source); + canonicalize_types_scheduled(); if (show_stats()) { @@ -15270,94 +15117,9 @@ read_debug_info_into_corpus(read_context& ctxt) /// all of its sub-types are canonicalized themselve. Non composite /// types are always deemed suitable for early canonicalization. /// -/// Note that this function doesn't work on *ANONYMOUS* classes, -/// structs, unions or enums because it first does some -/// canonicalization of the DWARF DIE @p die. That canonicalization -/// is done by looking up @p die by name; and because these are -/// anonymous types, they don't have names! and so that -/// canonicalization fails. So the type artifact associated to @p -/// die often ends being *NOT* canonicalized. This later leads to -/// extreme slowness of operation, especially when comparisons are -/// later performed on these anonymous types. -/// -/// So when you have classes, structs, unions, or enums that can be -/// anonymous, please use this overload instead: -/// -/// void -/// maybe_canonicalize_type(const Dwarf_Die* die, -/// const type_base_sptr& t, -/// read_context& ctxt); -/// -/// It knows how to deal with anonymous types. -/// -/// @p looks up the type artifact -/// associated to @p die. During that lookup, ; but then those types don't have -/// names because they are anonymous. -/// -/// @param die the type DIE to consider for canonicalization. Note -/// that this DIE must have been associated with its type using the -/// function read_context::associate_die_to_type() prior to calling -/// this function. -/// -/// @param ctxt the @ref read_context to use. -static void -maybe_canonicalize_type(const Dwarf_Die *die, read_context& ctxt) -{ - const die_source source = ctxt.get_die_source(die); - - size_t die_offset = dwarf_dieoffset(const_cast(die)); - type_base_sptr t = ctxt.lookup_type_from_die(die); - - if (!t) - return; - - type_base_sptr peeled_type = peel_typedef_pointer_or_reference_type(t); - if (is_class_type(peeled_type) - || is_union_type(peeled_type) - || is_function_type(peeled_type) - || is_array_type(peeled_type) - || is_qualified_type(peeled_type) - || is_enum_type(peeled_type) - || is_typedef(t)) - // We delay canonicalization of classes/unions or typedef, - // pointers, references and array to classes/unions. This is - // because the (underlying) class might not be finished yet and we - // might not be able to able detect it here (thinking about - // classes that are work-in-progress, or classes that might be - // later amended by some DWARF construct). So we err on the safe - // side. We also delay canonicalization for array and qualified - // types because they can be edited (in particular by - // maybe_strip_qualification) after they are initially built. - ctxt.schedule_type_for_late_canonicalization(die); - else if (is_decl(t) && is_decl(t)->get_is_anonymous()) - ctxt.schedule_type_for_late_canonicalization(t); - else if ((is_function_type(t) - && ctxt.is_wip_function_type_die_offset(die_offset, source)) - || type_has_non_canonicalized_subtype(t)) - ctxt.schedule_type_for_late_canonicalization(die); - else - canonicalize(t); -} - -/// Canonicalize a type if it's suitable for early canonicalizing, or, -/// if it's not, schedule it for late canonicalization, after the -/// debug info of the current translation unit has been fully read. -/// -/// A (composite) type is deemed suitable for early canonicalizing iff -/// all of its sub-types are canonicalized themselve. Non composite -/// types are always deemed suitable for early canonicalization. -/// -/// Note that this function nows how to deal with anonymous classes, +/// Note that this function knows how to deal with anonymous classes, /// structs and enums, unlike the overload below: /// -/// void maybe_canonicalize_type(const Dwarf_Die *die, read_context& ctxt) -/// -/// The problem, though is that this function is much slower that that -/// overload above because of how the types that are meant for later -/// canonicalization are stored. So the idea is that this function -/// should be used only for the smallest possible subset of types that -/// are anonymous and thus cannot be handled by the overload above. -/// /// @param t the type DIE to consider for canonicalization. /// /// @param ctxt the @ref read_context to use. @@ -15558,7 +15320,7 @@ build_ir_node_from_die(read_context& ctxt, if (result) { maybe_set_member_type_access_specifier(is_decl(result), die); - maybe_canonicalize_type(die, ctxt); + maybe_canonicalize_type(t, ctxt); } } break; @@ -15574,7 +15336,7 @@ build_ir_node_from_die(read_context& ctxt, result = add_decl_to_scope(p, ctxt.cur_transl_unit()->get_global_scope()); ABG_ASSERT(result->get_translation_unit()); - maybe_canonicalize_type(die, ctxt); + maybe_canonicalize_type(p, ctxt); } } break; @@ -15592,7 +15354,7 @@ build_ir_node_from_die(read_context& ctxt, add_decl_to_scope(r, ctxt.cur_transl_unit()->get_global_scope()); ctxt.associate_die_to_type(die, r, where_offset); - maybe_canonicalize_type(die, ctxt); + maybe_canonicalize_type(r, ctxt); } } break; @@ -15752,7 +15514,7 @@ build_ir_node_from_die(read_context& ctxt, { result = f; result->set_is_artificial(false); - maybe_canonicalize_type(die, ctxt); + maybe_canonicalize_type(f, ctxt); } } break; @@ -15767,7 +15529,7 @@ build_ir_node_from_die(read_context& ctxt, result = add_decl_to_scope(a, ctxt.cur_transl_unit()->get_global_scope()); ctxt.associate_die_to_type(die, a, where_offset); - maybe_canonicalize_type(die, ctxt); + maybe_canonicalize_type(a, ctxt); } break; } @@ -15783,7 +15545,7 @@ build_ir_node_from_die(read_context& ctxt, result = add_decl_to_scope(s, ctxt.cur_transl_unit()->get_global_scope()); ctxt.associate_die_to_type(die, s, where_offset); - maybe_canonicalize_type(die, ctxt); + maybe_canonicalize_type(s, ctxt); } } break; @@ -15981,7 +15743,7 @@ build_ir_node_from_die(read_context& ctxt, ctxt.maybe_add_fn_to_exported_decls(fn.get()); ctxt.associate_die_to_decl(die, fn, where_offset, /*associate_by_repr=*/false); - maybe_canonicalize_type(die, ctxt); + maybe_canonicalize_type(fn->get_type(), ctxt); } ctxt.scope_stack().pop(); diff --git a/tests/data/test-annotate/test13-pr18894.so.abi b/tests/data/test-annotate/test13-pr18894.so.abi index d73aa81e..addb886e 100644 --- a/tests/data/test-annotate/test13-pr18894.so.abi +++ b/tests/data/test-annotate/test13-pr18894.so.abi @@ -2259,6 +2259,24 @@ + + + + + + + + + + + + + + + + + + @@ -2279,24 +2297,6 @@ - - - - - - - - - - - - - - - - - - diff --git a/tests/data/test-annotate/test15-pr18892.so.abi b/tests/data/test-annotate/test15-pr18892.so.abi index 642b2b6b..6d71ed97 100644 --- a/tests/data/test-annotate/test15-pr18892.so.abi +++ b/tests/data/test-annotate/test15-pr18892.so.abi @@ -3326,6 +3326,21 @@ + + + + + + + + + + + + + + + @@ -3365,21 +3380,6 @@ - - - - - - - - - - - - - - - @@ -6799,12 +6799,14 @@ - - + + + + + + - - @@ -6822,14 +6824,12 @@ - - - - - - + + + + @@ -26505,7 +26505,7 @@ - + @@ -26738,17 +26738,6 @@ - - - - - - - - - - - @@ -26790,6 +26779,17 @@ + + + + + + + + + + + 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 927cd170..b2016e79 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 @@ -9691,11 +9691,6 @@ - - - - - @@ -9703,6 +9698,11 @@ + + + + + diff --git a/tests/data/test-annotate/test21-pr19092.so.abi b/tests/data/test-annotate/test21-pr19092.so.abi index 263e9a17..befbb376 100644 --- a/tests/data/test-annotate/test21-pr19092.so.abi +++ b/tests/data/test-annotate/test21-pr19092.so.abi @@ -2541,6 +2541,11 @@ + + + + + @@ -2568,6 +2573,13 @@ + + + + + + + @@ -2584,18 +2596,6 @@ - - - - - - - - - - - - @@ -4566,8 +4566,10 @@ - - + + + + @@ -4575,10 +4577,8 @@ - - - - + + diff --git a/tests/data/test-diff-pkg/nss-3.23.0-1.0.fc23.x86_64-report-0.txt b/tests/data/test-diff-pkg/nss-3.23.0-1.0.fc23.x86_64-report-0.txt index c78ed700..546942fe 100644 --- a/tests/data/test-diff-pkg/nss-3.23.0-1.0.fc23.x86_64-report-0.txt +++ b/tests/data/test-diff-pkg/nss-3.23.0-1.0.fc23.x86_64-report-0.txt @@ -68,7 +68,7 @@ ================ end of changes of 'libssl3.so'=============== ================ changes of 'libsmime3.so'=============== - Functions changes summary: 0 Removed, 1 Changed (145 filtered out), 0 Added functions + Functions changes summary: 0 Removed, 1 Changed (127 filtered out), 0 Added functions Variables changes summary: 0 Removed, 0 Changed, 0 Added variable 1 function with some indirect sub-type change: @@ -87,7 +87,7 @@ in pointed to type 'typedef NSSCMSEncryptedData' at cmst.h:65:1: underlying type 'struct NSSCMSEncryptedDataStr' at cmst.h:468:1 changed: type size hasn't changed - 1 data member changes (2 filtered): + 1 data member changes (1 filtered): type of 'NSSCMSAttribute** unprotectedAttr' changed: in pointed to type 'NSSCMSAttribute*': in pointed to type 'typedef NSSCMSAttribute' at cmst.h:69:1: diff --git a/tests/data/test-read-dwarf/PR22122-libftdc.so.abi b/tests/data/test-read-dwarf/PR22122-libftdc.so.abi index 844ddd39..e226982c 100644 --- a/tests/data/test-read-dwarf/PR22122-libftdc.so.abi +++ b/tests/data/test-read-dwarf/PR22122-libftdc.so.abi @@ -2854,6 +2854,9 @@ + + + @@ -2924,9 +2927,6 @@ - - - @@ -3921,18 +3921,21 @@ - + + + + - + - - - - - - + + + + + + @@ -4190,7 +4193,7 @@ - + @@ -4199,7 +4202,7 @@ - + @@ -4273,9 +4276,6 @@ - - - @@ -4316,7 +4316,7 @@ - + diff --git a/tests/data/test-read-dwarf/test12-pr18844.so.abi b/tests/data/test-read-dwarf/test12-pr18844.so.abi index 5018c1fd..a5419962 100644 --- a/tests/data/test-read-dwarf/test12-pr18844.so.abi +++ b/tests/data/test-read-dwarf/test12-pr18844.so.abi @@ -25568,6 +25568,9 @@ + + + @@ -25604,9 +25607,6 @@ - - - diff --git a/tests/data/test-read-dwarf/test13-pr18894.so.abi b/tests/data/test-read-dwarf/test13-pr18894.so.abi index 71bb9af8..187f8048 100644 --- a/tests/data/test-read-dwarf/test13-pr18894.so.abi +++ b/tests/data/test-read-dwarf/test13-pr18894.so.abi @@ -1357,6 +1357,16 @@ + + + + + + + + + + @@ -1368,16 +1378,6 @@ - - - - - - - - - - diff --git a/tests/data/test-read-dwarf/test15-pr18892.so.abi b/tests/data/test-read-dwarf/test15-pr18892.so.abi index 01ea8828..0970c836 100644 --- a/tests/data/test-read-dwarf/test15-pr18892.so.abi +++ b/tests/data/test-read-dwarf/test15-pr18892.so.abi @@ -1696,6 +1696,14 @@ + + + + + + + + @@ -1717,14 +1725,6 @@ - - - - - - - - @@ -3906,9 +3906,10 @@ - + + + - @@ -3919,10 +3920,9 @@ - - - + + @@ -14984,7 +14984,7 @@ - + @@ -15112,12 +15112,6 @@ - - - - - - @@ -15141,6 +15135,12 @@ + + + + + + diff --git a/tests/data/test-read-dwarf/test16-pr18904.so.abi b/tests/data/test-read-dwarf/test16-pr18904.so.abi index 8fcf470f..4ae32b8e 100644 --- a/tests/data/test-read-dwarf/test16-pr18904.so.abi +++ b/tests/data/test-read-dwarf/test16-pr18904.so.abi @@ -23044,11 +23044,6 @@ - - - - - @@ -23078,6 +23073,11 @@ + + + + + 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 b3253452..e4a19af4 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 @@ -5891,13 +5891,13 @@ - - - + + + diff --git a/tests/data/test-read-dwarf/test21-pr19092.so.abi b/tests/data/test-read-dwarf/test21-pr19092.so.abi index 9ae0cc8d..de771031 100644 --- a/tests/data/test-read-dwarf/test21-pr19092.so.abi +++ b/tests/data/test-read-dwarf/test21-pr19092.so.abi @@ -1518,6 +1518,9 @@ + + + @@ -1533,6 +1536,10 @@ + + + + @@ -1542,13 +1549,6 @@ - - - - - - - @@ -3007,13 +3007,13 @@ - + + - - + -- 2.37.2 -- Dodji