From patchwork Tue May 12 15:50:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 38975 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 B6B6E386F827; Tue, 12 May 2020 15:50:46 +0000 (GMT) X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by sourceware.org (Postfix) with ESMTPS id 62911386F827 for ; Tue, 12 May 2020 15:50:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 62911386F827 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=seketeli.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dodji@seketeli.org X-Originating-IP: 91.166.131.130 Received: from localhost (91-166-131-130.subs.proxad.net [91.166.131.130]) (Authenticated sender: dodj@seketeli.org) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 06119FF80F for ; Tue, 12 May 2020 15:50:41 +0000 (UTC) Received: by localhost (Postfix, from userid 1001) id 99FF21A4B6E; Tue, 12 May 2020 17:50:40 +0200 (CEST) From: Dodji Seketeli To: libabigail@sourceware.org Subject: [PATCH] Bug 25977 - runtestabidiffexit regression on EL7 Organization: Me, myself and I X-Operating-System: Red Hat Enterprise Linux Server 7.7 X-URL: http://www.seketeli.net/~dodji Date: Tue, 12 May 2020 17:50:40 +0200 Message-ID: <86lflxf8z3.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-Spam-Status: No, score=-8.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , Errors-To: libabigail-bounces@sourceware.org Sender: "Libabigail" Hello, When running runtestabidiffexit I am getting this failure: $ ./build/tests/runtestabidiffexit --- /home/dodji/git/libabigail/master/tests/data/test-abidiff-exit/test-leaf-cxx-members-report.txt 2020-04-16 11:19:27.615339665 +0200 +++ /home/dodji/git/libabigail/master/build/tests/output/test-abidiff-exit/test-leaf-cxx-members-report.txt 2020-05-12 16:15:34.316685604 +0200 @@ -1,6 +1,6 @@ -Leaf changes summary: 4 artifacts changed +Leaf changes summary: 3 artifacts changed (1 filtered out) Changed leaf types summary: 1 leaf type changed -Removed/Changed/Added functions summary: 1 Removed, 1 Changed, 1 Added function +Removed/Changed/Added functions summary: 1 Removed, 0 Changed (1 filtered out), 1 Added function Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable 1 Removed function: @@ -13,13 +13,6 @@ [A] 'method virtual long int ops::added_fn()' {_ZN3ops8added_fnEv} note that this adds a new entry to the vtable of struct ops -1 function with some sub-type change: - - [C] 'method virtual int ops::changed_fn()' at test-leaf-cxx-members-v1.cc:5:1 has some sub-type changes: - return type changed: - type name changed from 'int' to 'long int' - type size changed from 32 to 64 (in bits) - 'struct ops at test-leaf-cxx-members-v0.cc:2:1' changed: type size changed from 128 to 192 (in bits) 1 member function deletion: @@ -27,10 +20,6 @@ 1 member function insertion: 'method virtual long int ops::added_fn()' at test-leaf-cxx-members-v1.cc:11:1, virtual at voffset 1/1 {_ZN3ops8added_fnEv} there are member function changes: - 'method virtual int ops::changed_fn()' has some changes: - return type changed: - type name changed from 'int' to 'long int' - type size changed from 32 to 64 (in bits) 1 data member deletion: 'int ops::deleted_var', at offset 96 (in bits) at test-leaf-cxx-members-v0.cc:5:1 1 data member insertion: $ This is because we wrongly consider the canonical diff node for the change on the type of function "int ops::changed_fn()" as being suppressed. This is because of an old thinko in the suppression categorization and propagation pass for local types changes to functions. Oops. Fixed thus and applied to master. * abg-comparison.cc: (suppression_categorization_visitor::visit_end): Don't suppress the entire class of equivalence of a function diff node if that function diff node itself was not suppressed. Signed-off-by: Dodji Seketeli --- src/abg-comparison.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/abg-comparison.cc b/src/abg-comparison.cc index 399c4b9..57cc6c2 100644 --- a/src/abg-comparison.cc +++ b/src/abg-comparison.cc @@ -11580,12 +11580,14 @@ struct suppression_categorization_visitor : public diff_node_visitor // the user asked and suppress the function altogether, if (function_type_diff_sptr fn_type_diff = fn_diff->type_diff()) if (fn_type_diff->is_suppressed()) - d->add_to_category(SUPPRESSED_CATEGORY); - // If a node was suppressed, all the other nodes of its class - // of equivalence are suppressed too. - diff *canonical_diff = d->get_canonical_diff(); - if (canonical_diff != d) - canonical_diff->add_to_category(SUPPRESSED_CATEGORY); + { + d->add_to_category(SUPPRESSED_CATEGORY); + // If a node was suppressed, all the other nodes + // of its class of equivalence are suppressed too. + diff *canonical_diff = d->get_canonical_diff(); + if (canonical_diff != d) + canonical_diff->add_to_category(SUPPRESSED_CATEGORY); + } } } }