From patchwork Fri Sep 6 20:54: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: 97289 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 8AB31384A402 for ; Fri, 6 Sep 2024 20:54:36 +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 6BE273858C56 for ; Fri, 6 Sep 2024 20:54:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6BE273858C56 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 6BE273858C56 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=1725656071; cv=none; b=pDKY52rJ0D7doaYQbjbYICYN8D+IE+U1LztfqFiMooxihENjEUT/mGoj6NjpTqKv6+WvYXwmfUTSL2zeL9y3SpB6q1YCIPJJWQTS7iKZLjhH4POmXYl9+BBOWeM/ljBqqwLdoII8idy6xvIIzxo6R1uO5sforvNIl1pCo0Kg4/M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725656071; c=relaxed/simple; bh=S29VeRXQHJgc3eppq9uxKBFMyPijGuCGU5MaPtN+w/I=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ZEKFy2qh6R9FFRLw2JNxfGf7Qiijoe2cC7zCYmyHOVpZFQOw2FnW7q27FYne/ZdUmqGDotrXNyjU/8cNgz1R7u/l4e/5daERNWaLuIY9z//jxZ83LmIujq74V1aBc7zHsDPnCt+3U+wiawezL0fpFWFruMCGnqttYJQQsEHXMdE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725656069; 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=+0O90becWQOebEx6n2kmHS+oySz799bRcQkHtvWOiL8=; b=Ko84Som9wxwFXs2LoiV4DVD1GL+V1ZcUXGLEHBVAnHrYZ74B/HbhUe7vcHndLqlUoHQATp wtufk+p6hMY+4EKt/JofYgsLxgSUZUM62HXYbC+DsyMKFkkU2FHd6JG7JcFLTewbFouQAZ CnoHb1T/CRbj4HqCJj3Os9IwevTgE8o= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-606-oSf2ILHhNGeOxkFglx2HRg-1; Fri, 06 Sep 2024 16:54:28 -0400 X-MC-Unique: oSf2ILHhNGeOxkFglx2HRg-1 Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-4567535a819so38803281cf.1 for ; Fri, 06 Sep 2024 13:54:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725656067; x=1726260867; h=mime-version:user-agent:message-id:date:organization:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+0O90becWQOebEx6n2kmHS+oySz799bRcQkHtvWOiL8=; b=jJLbldCDWNXbRbr9y1HOFEwD6UO0kLCUT9MLP+Lyqo43l/59J+T+mo9luuob/FflT7 TYd0IO3WTs/NFBJuup4KNnCNv5b4NxTcZD7YmLUfLtKCB+9Zs8TfvxxC72nQ4kJ0T2Pp qOgVzJhd0irHhNnAbAYrzBdGCZVb8/ikOBnUwupt9H5HhqEqT51ALFAIu+wAH2XDFtDB JtPSIn3hIKWle4NkjaUETGmETaPfnQJCIO4/qbEHSl21Wvwi0HRK9ghADZ8uFdTV4dvu qF/Dle6ptnTQX6XfjMOII1CsxPC/C954qOg6fzUwlWSWa6PGrJO6RPTKFj1nk3glf4U+ zHcQ== X-Gm-Message-State: AOJu0Yx6cLON3i7DqQNlA/KAiVuVmDOaaL+808yNtvJHQdeUMckQb9OU JabWz4syA3jcXVB5JpFB81VjWBUbDO1G0B31iOk9UwchPAiZ5ilg4vNHnbzOyhweoP/ZCnjr9Vi Cu+MZpm+VMOIYHoXH7srkCvHazDL9ujHMG2HDS6/VX7f8K8nKpkDD07l2oTr0Mh9wipEVAi6aQs MUD133YlbKfMefxAkq0JlNXhpfHYiyIoElEs3qRg== X-Received: by 2002:a05:622a:1a9b:b0:458:256:bf7c with SMTP id d75a77b69052e-4580c74f5camr45249111cf.44.1725656067431; Fri, 06 Sep 2024 13:54:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHZkamQOQVPCYOh1kB1r25/oTDZ9KJKSRTBJkpuhE0QPaMdH2YncbuLrkx2fGYGQ4DzZ8Piug== X-Received: by 2002:a05:622a:1a9b:b0:458:256:bf7c with SMTP id d75a77b69052e-4580c74f5camr45248781cf.44.1725656066857; Fri, 06 Sep 2024 13:54:26 -0700 (PDT) Received: from localhost (88-120-130-27.subs.proxad.net. [88.120.130.27]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-45801b0ee8dsm19379041cf.6.2024.09.06.13.54.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 13:54:26 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id 8FF4C503C602; Fri, 6 Sep 2024 22:54:24 +0200 (CEST) From: Dodji Seketeli To: libabigail@sourceware.org Subject: [PATCH, applied] ir: Improve the checks done by 'abidw --debug-tc' Organization: Red Hat / France X-Operating-System: AlmaLinux 9.4 X-URL: http://www.redhat.com Date: Fri, 06 Sep 2024 22:54:24 +0200 Message-ID: <87mskkh5a7.fsf@redhat.com> 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.1 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, The abidw --debug-tc option (enabled by the --enable-debug-type-canonicalization configure option) performs every type comparison twice; once structurally and once canonically. This patch improves that checking mode by disabling comparison result caching. It makes things slower but it makes the checking more reliable. * src/abg-ir.cc (compare_types_during_canonicalization): Disable type comparison result caching during type canonicalization debugging. Signed-off-by: Dodji Seketeli --- src/abg-ir.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/abg-ir.cc b/src/abg-ir.cc index 9348d3c9..bc4eb2b3 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -15214,10 +15214,12 @@ compare_types_during_canonicalization(const type_base& canonical_type, if (env.debug_type_canonicalization_is_on()) { bool canonical_equality = false, structural_equality = false; + env.priv_->allow_type_comparison_results_caching(false); env.priv_->use_canonical_type_comparison_ = false; structural_equality = canonical_type == candidate_type; env.priv_->use_canonical_type_comparison_ = true; canonical_equality = canonical_type == candidate_type; + env.priv_->allow_type_comparison_results_caching(true); if (canonical_equality != structural_equality) { std::cerr << "structural & canonical equality different for type: "