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.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 Content-Type: text/plain 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 List-Id: 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); -- 2.43.5 -- Dodji