From patchwork Sat Aug 17 12:00:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 96023 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 16D203861833 for ; Sat, 17 Aug 2024 12:00:38 +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 [IPv6:2001:4b98:dc4:8::229]) by sourceware.org (Postfix) with ESMTPS id B53123861821 for ; Sat, 17 Aug 2024 12:00:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B53123861821 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=seketeli.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B53123861821 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:4b98:dc4:8::229 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1723896033; cv=none; b=MK15cFDll6vtL+Bg3iIHAfK2zycZrdFrS4T8s1hUshdM79Ns0INaiyCAlGZve6wWH6l7VxCvZTGhBC5IUraiWQpjz4SzSH0r+1oa2Lo51t7LHLXIFq4+aC89+BXilQHKNrKFx6EhvRzprigDGTiq5GavEwSnR33FWH6rZO1pEu0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1723896033; c=relaxed/simple; bh=MbykQyYZwTHtKI6JyokuXqSHapeNr1uKIPfyTHthoQ4=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=BP/aUS698HCrwbUqQTkNKLOp27A8lP8VUM0PiRtsXN03621q+m2MoWvmC+rkDBhNHF2c6UQxVutGqT/tSsbzr7Vbr3yFSMd3QQg1ng2Ps6+BJVhjv40jBHukOjsBU7RkpfdKoLkVos7b5KEMUxVc43+80PTge/r0bQRVWleiRU8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail.gandi.net (Postfix) with ESMTPSA id 75053FF803; Sat, 17 Aug 2024 12:00:27 +0000 (UTC) Received: by localhost (Postfix, from userid 1000) id B3A92507F1C9; Sat, 17 Aug 2024 14:00:26 +0200 (CEST) From: Dodji Seketeli To: libabigail@sourceware.org Cc: dodji@redhat.com Subject: [PATCH 2/4] ir: Don't cache internal name of non-canonicalized function types Date: Sat, 17 Aug 2024 14:00:24 +0200 Message-ID: <20240817120026.459568-2-dodji@redhat.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20240817120026.459568-1-dodji@redhat.com> References: <20240817120026.459568-1-dodji@redhat.com> MIME-Version: 1.0 X-GND-Sasl: dodj@seketeli.org X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, SPF_PASS, 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 When a function type is not yet canonicalized, do not cache its name, otherwise, the name can capture the state of the function in a too early state. * src/abg-ir.cc (function_type::get_cached_name): Do not cache internal name for non-canonicalized function types. Signed-off-by: Dodji Seketeli --- src/abg-ir.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/abg-ir.cc b/src/abg-ir.cc index bc23254a..873f3750 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -21633,9 +21633,8 @@ function_type::get_cached_name(bool internal) const } else { - if (priv_->temp_internal_cached_name_.empty()) - priv_->temp_internal_cached_name_ = - get_function_type_name(this, /*internal=*/true); + priv_->temp_internal_cached_name_ = + get_function_type_name(this, /*internal=*/true); return priv_->temp_internal_cached_name_; } }