From patchwork Tue Dec 20 15:35:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 62196 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 0A8083858436 for ; Tue, 20 Dec 2022 15:35:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0A8083858436 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1671550537; bh=XIxzJGfdtdLDQGOopIYip/qtXTwgAQgRR+2Tl8VEOs8=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Help: List-Subscribe:From:Reply-To:From; b=VbTNSm27QBI0oUgnQGwgDdthSMbDph2ghDlr0flbqkvN8Rxg2BjpfpY9mq3mCPpFr ZHjLDFpIopr4ZsfqmVru/hqviaJdYU5h4X2n3CeEgyza4UEprv+zf1CMzgJvNNk2bQ LJ73PJVK/HK1GmIgERo9rE6fZRmwQxpUYiHp82pc= 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 ESMTPS id 33B2C385842C for ; Tue, 20 Dec 2022 15:35:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 33B2C385842C Received: from mail-yb1-f197.google.com (mail-yb1-f197.google.com [209.85.219.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-92-tX4nHVDbOl2UV1QYAFb5ZQ-1; Tue, 20 Dec 2022 10:35:29 -0500 X-MC-Unique: tX4nHVDbOl2UV1QYAFb5ZQ-1 Received: by mail-yb1-f197.google.com with SMTP id f11-20020a5b01cb000000b0070374b66537so14624144ybp.14 for ; Tue, 20 Dec 2022 07:35:29 -0800 (PST) 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:message-id:reply-to; bh=XIxzJGfdtdLDQGOopIYip/qtXTwgAQgRR+2Tl8VEOs8=; b=HhuQuSd5pqHCSoIUbW0UE8n3bXBaZv4kVn3xYpudiG7nNqQjGBdUpM0vy3CIgtDruX XUOlrW5J0Yr40k+VDejIVMkfUoqUKMCwlQ6ApirThVj+gIPGGGZhC50FcbkOwqahAt7M zeYNvWcbVTxwzpjcFpOcUh0MWcHMn4N2WEl1XrwtWlpTZVeqG/ELceS2eWCeqIARtV12 J4dY0Q5EpX/I82pbYCMQloTcJdkAszS/vXMMW21MHE6fqfBeE0Y78GpEox0Acad7YlGo L4d6rWfz/DoOHX8UFdLCq4lxtBM8EUihaG6tZ9iYjun3YNF2Aw9bVaO4aAJTq+rNp5Po PiRA== X-Gm-Message-State: ANoB5pkIui7uW8lav2gtkS1zFCGe/6okRnLWdC2Ruo6kRZqLoupulh/v 5d950aYj/8DG9wnaA841bDZYkgi2EQLvE/PhSrpb7+98SLetZG+HinrPm/+wFz+4Wt1bmeqP+Ei d2gY9Tme5VIW1KtXk8RxXLR2OeWlGSaXZcXCj9bDpV4I7P5p9cg7MAI3ZZIph+V5NG0z5 X-Received: by 2002:a05:7500:6816:b0:ec:838c:bea7 with SMTP id hd22-20020a057500681600b000ec838cbea7mr4320206gab.42.1671550528846; Tue, 20 Dec 2022 07:35:28 -0800 (PST) X-Google-Smtp-Source: AA0mqf4/Y238vSbbz50W91CoWYeJEev8ZXss34bRSxCjNL6pa0118LCET/zIYWGCdHKkRDU9nJSR2Q== X-Received: by 2002:a05:7500:6816:b0:ec:838c:bea7 with SMTP id hd22-20020a057500681600b000ec838cbea7mr4320188gab.42.1671550528308; Tue, 20 Dec 2022 07:35:28 -0800 (PST) Received: from localhost ([88.120.130.27]) by smtp.gmail.com with ESMTPSA id u8-20020a05620a454800b006f474e6a715sm8936774qkp.131.2022.12.20.07.35.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Dec 2022 07:35:27 -0800 (PST) Received: by localhost (Postfix, from userid 1000) id 102DEB5649; Tue, 20 Dec 2022 16:35:26 +0100 (CET) To: libabigail@sourceware.org Subject: [PATCH, applied] Bug 29901 - abidiff hangs when comparing libgs.so.10 with itself Organization: Red Hat / France X-Operating-System: CentOS Stream release 9 X-URL: http://www.redhat.com Date: Tue, 20 Dec 2022 16:35:26 +0100 Message-ID: <871qoudr5t.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 X-Spam-Status: No, score=-11.6 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_H2, SPF_HELO_NONE, SPF_NONE, TXREP 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.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-Patchwork-Original-From: Dodji Seketeli via Libabigail From: Dodji Seketeli Reply-To: Dodji Seketeli Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libabigail" Hello, This is a follow-up patch to this one: 88c6e080 Bug 29857 - Better detect comparison cycles in type graph When looking at the type comparison stack, it looks like a type that is on the left-hand side of the comparison can appear on the right-hand side later, in the comparison stack. The cycle detection algorithm doesn't take that scenario into account and so that cycle in the graph of types being compared is not detected. This patch takes that case into account. * src/abg-ir-priv.h (environment::priv::comparison_started): Look for each operand of the comparison in both the right-hand and left-hand operand stacks. Signed-off-by: Dodji Seketeli Applied to the master branch of the git repository. --- src/abg-ir-priv.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/abg-ir-priv.h b/src/abg-ir-priv.h index ae6fabd7..b216c957 100644 --- a/src/abg-ir-priv.h +++ b/src/abg-ir-priv.h @@ -1246,8 +1246,9 @@ struct class_or_union::priv const environment& env = first.get_environment(); return (env.priv_->left_classes_being_compared_.count(&first) - || - env.priv_->right_classes_being_compared_.count(&second)); + || env.priv_->right_classes_being_compared_.count(&second) + || env.priv_->right_classes_being_compared_.count(&first) + || env.priv_->left_classes_being_compared_.count(&second)); } /// Test if a pair of class_or_union is being currently compared.