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 ESMTPS id E9CED3858422 for ; Thu, 22 Sep 2022 14:51:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E9CED3858422 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663858270; 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; bh=ru+KDXLcW2nDdclykOpuzfsO4bIna7ECMmiKYKIoZ3k=; b=NBdcC5PqjMJv1yIsr8e7AX8n4g6gq0usW7ACbOjg4o1XsRpl8mWxL51kOVbddwWj0tQQoD 5ZT9H86KbMxuia6waaFIifzu2MI6Rrfghkt6BrXGW1XOl7I31BsnTC5Ppbj0YPp1WKixno 9Fb1/LGQgKLdmTOO1x+5rJSyX6/kusA= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-553-QyXNeauQMxqHpOpKzR78fA-1; Thu, 22 Sep 2022 10:51:08 -0400 X-MC-Unique: QyXNeauQMxqHpOpKzR78fA-1 Received: by mail-qv1-f72.google.com with SMTP id dw19-20020a0562140a1300b004a8eee124b4so6645289qvb.21 for ; Thu, 22 Sep 2022 07:51:08 -0700 (PDT) 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:cc:to :from:x-gm-message-state:from:to:cc:subject:date; bh=ru+KDXLcW2nDdclykOpuzfsO4bIna7ECMmiKYKIoZ3k=; b=urhZ75itFnX+bLLSKZMbHF0aKxLjLAjyj/krSYA0Gh2+GbiKyK5olrYZOCSiMDQHbN CJDdm2fJuOX73EeNL9UtR2jAIRVDq3NZnmSohQHz4CqV9/mdNZ+cwa7OVbBIT0Q2B5Tq FaCcq2vAqzvhI428LvUIkdXP+y805VDn6PueC5K8BFU8AqNFez6OtgM2ZQWputQ6FDrT eStSgsrvPOGBDTY/5PE+5v6tezB/CWtEcvbG9gGwP7epwWByMEATDKQIJus23QN0fOgr Aa8qAVGwzHeRFtahOFd7TpxyBgAuUIwcErfu5z3E6NGROYj0TBGW4yd5ItJjkR4G8YMX 4y1g== X-Gm-Message-State: ACrzQf0S5ITQLTugCV2v9Dl7anja/9gjTV0IY2FgvTvnvObJbOs9t8Cg SG6sAf3ERcJgceHkfZYSGE+FOw7S8SnRCrtmilV5NYSFfsBow4gm5oLQ2k6VccDGhNCh8xIednm nRhuKddV0NivtPljHBxau X-Received: by 2002:a05:622a:1a1b:b0:35c:d51b:505b with SMTP id f27-20020a05622a1a1b00b0035cd51b505bmr3269299qtb.308.1663858267858; Thu, 22 Sep 2022 07:51:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5x8njw+PPPURQ93d+hqrqxQN/mPfeXaMrdulz/JyQloYJXG5Z/LfLd9tIFe/vRXA9TnmEr9g== X-Received: by 2002:a05:622a:1a1b:b0:35c:d51b:505b with SMTP id f27-20020a05622a1a1b00b0035cd51b505bmr3269283qtb.308.1663858267678; Thu, 22 Sep 2022 07:51:07 -0700 (PDT) Received: from localhost ([88.120.130.27]) by smtp.gmail.com with ESMTPSA id g19-20020ac87f53000000b0031ef0081d77sm3730434qtk.79.2022.09.22.07.51.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 07:51:07 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id C7958581C2F; Thu, 22 Sep 2022 16:51:04 +0200 (CEST) From: Dodji Seketeli To: libabigail@sourceware.org Cc: woodard@redhat.com Subject: [PATCH, applied] ir: Support cloning data members of unions Organization: Red Hat / France X-Operating-System: Fedora 38 X-URL: http://www.redhat.com Date: Thu, 22 Sep 2022 16:51:04 +0200 Message-ID: <87tu4z4g4n.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 Content-Type: text/plain 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_LOW,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 List-Id: Hello, When cloning a data member, var_decl::clone wrongly assumes we are looking at a data member of a class. It could also be a data member of an union. Fixed thus. This fixes crashes when self comparing Fedora 36 packages of the qt6 group with the command: $ fedabipkgdiff --self-compare --from fc36 qt6-qtsensors There are lot of other packages from the qt group that were making this command fail, but I am not mentioning them here for the sake conciseness. * src/abg-ir.cc (var_decl::clone): Support cloning data members for unions. Signed-off-by: Dodji Seketeli Applied to master. --- src/abg-ir.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/abg-ir.cc b/src/abg-ir.cc index 1cd2a219..f739b126 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -19131,7 +19131,7 @@ var_decl::clone() const if (is_member_decl(*this)) { - class_decl* scope = dynamic_cast(get_scope()); + class_or_union* scope = is_class_or_union_type(get_scope()); scope->add_data_member(v, get_member_access_specifier(*this), get_data_member_is_laid_out(*this), get_member_is_static(*this), -- 2.37.2 -- Dodji