From patchwork Fri Nov 27 16:56:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 41215 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 C7B253857039; Fri, 27 Nov 2020 16:56:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C7B253857039 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1606496172; bh=oVdB8ph22ZFaInvZoOaqADHkJQgiMYDhj6B4emVvKCY=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Help: List-Subscribe:From:Reply-To:From; b=AMm8ZPR13BYGRO4L73vK3UgPCm8mDrn/8EXMzbIzKG5ZJsYTw/G/2q8/YErPmvOkV x9+FqlHgwBI02BzeH6lWeCsNKTU77TkndLqEukBdAlw86DnqGe3kIqNoFp9STL+3SB WvJ3i9Kd3kWyRq5zEz/s4KhKDpFAirTo82jAbHTk= 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 [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 32D853857039 for ; Fri, 27 Nov 2020 16:56:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 32D853857039 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-567-OeqpU9GsPlKVyq9IitVXlA-1; Fri, 27 Nov 2020 11:56:07 -0500 X-MC-Unique: OeqpU9GsPlKVyq9IitVXlA-1 Received: by mail-wm1-f69.google.com with SMTP id h68so1280072wme.5 for ; Fri, 27 Nov 2020 08:56:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:organization:date:message-id :user-agent:mime-version; bh=oVdB8ph22ZFaInvZoOaqADHkJQgiMYDhj6B4emVvKCY=; b=Ygb6vRvPbEYEbl+/ZLaIeWbdnoOnQ19xJ3NoYPJtWNp+LZGi1s2gj1WZjqH+qQUZB/ FqfUKJBp6/vogaDgT7HzwDh5YNSs8gYAx/pr2/oHpwfAUJI/pVOwEqZDg/yf9ol2Um+/ fsla0pMY3cnR+fMFdCzGh0HNz5TzX6r+zd6fC/FT3KJH5lJDyi6UVHCAZR+QHSI8jw14 XR9QI1I5wvCsR2kloWeeZVLrwZ1tkbS2ARneIoYBxtMA8HYTGJrxG9rehpXdLmG3GVdw MswPdLhd2u3IO0QKpMWPUMCv2HgCA4fiFwoWhGwS4pgOp2QARSo2zvMZl4wj42dlfWn2 oucg== X-Gm-Message-State: AOAM533SoM+fn+HrcLOVVDInsLH1LCbtE2G+TO1ov9oVNOLgms1SMt3w AW0ou+yWMUHgEy6CjTTSmRzOw5605X8mQw8AtmfBHeBfY1Onsuy0pNQFGhdrAf3XNI8SwpS6bIf IfFewaSkf13fZTqgNVihu X-Received: by 2002:adf:e7d0:: with SMTP id e16mr11855161wrn.114.1606496166618; Fri, 27 Nov 2020 08:56:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJxpg+lvNKATU6PdRQ6WgwXdZS52eUKdFCMH5v+kcaYjQpDCEgoPk6tComjVxXQbGTAXZwVq3Q== X-Received: by 2002:adf:e7d0:: with SMTP id e16mr11855135wrn.114.1606496166417; Fri, 27 Nov 2020 08:56:06 -0800 (PST) Received: from localhost (91-166-131-65.subs.proxad.net. [91.166.131.65]) by smtp.gmail.com with ESMTPSA id w3sm14691525wma.3.2020.11.27.08.56.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Nov 2020 08:56:05 -0800 (PST) Received: by localhost (Postfix, from userid 1000) id 98C935802B4; Fri, 27 Nov 2020 17:56:03 +0100 (CET) To: libabigail@sourceware.org Subject: [PATCH 0/6] Fix subtle ABI artifact representation issues Organization: Red Hat / France X-Operating-System: Fedora 34 X-URL: http://www.redhat.com Date: Fri, 27 Nov 2020 17:56:03 +0100 Message-ID: <87h7pa7n8c.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=-4.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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: , X-Patchwork-Original-From: Dodji Seketeli via Libabigail From: Dodji Seketeli Reply-To: Dodji Seketeli Errors-To: libabigail-bounces@sourceware.org Sender: "Libabigail" Hello, The goal of this patch set is to fix a class of annoying issues that have been latent for a while now. Basically, when comparing the ABI of a binary against its own ABIXML representation, it is not uncommon to see 'harmless' ABI change reports being reported. This should not happen. In some of the reports the analyzer can't even describe what the alleged ABI changes are. These are all symptoms of subtle wrong representation or serialization of ABI artifacts. To work around those issues, the 'abidw --abidiff' and 'abipkgdiff --self-check' commands were made to avoid emitting an error when 'harmless' ABI changes were detected when comparing the ABI of a binary to its ABIXML representation. These series of patches address a number of those wrong representation issues and thus make 'abidw --abidiff' and 'abipkgdiff --self-check' emit an error for all changes detected when comparing the ABI of a binary against its own ABIXML representation. The first four patches fix four classes of these issues and the last two patches make 'abidw --abidiff' and 'abipkgdiff --self-check' emit error upon any ABI change. Dodji Seketeli (6): writer: Emit definitions of declarations when they are present ir: Introduce internal pretty representation for anonymous classes reader: Don't lose anonymous-ness of decl-only classes dwarf-reader: Avoid having several functions with the same symbol abidw: make --abidiff report any change against own ABIXML abipkgdiff: make --self-check to fail on any change against own ABIXML include/abg-fwd.h | 3 + src/abg-default-reporter.cc | 2 + src/abg-dwarf-reader.cc | 53 +- src/abg-ir.cc | 40 +- src/abg-reader.cc | 2 + src/abg-writer.cc | 16 +- tests/data/test-annotate/libtest23.so.abi | 140 +- .../data/test-annotate/test13-pr18894.so.abi | 1662 ++-- .../data/test-annotate/test15-pr18892.so.abi | 2277 +++--- .../data/test-annotate/test21-pr19092.so.abi | 2829 +++---- .../test-read-dwarf/PR22122-libftdc.so.abi | 5747 ++++++------- tests/data/test-read-dwarf/libtest23.so.abi | 138 +- .../test-read-dwarf/test-libandroid.so.abi | 196 +- .../test-read-dwarf/test10-pr18818-gcc.so.abi | 236 +- .../test-read-dwarf/test11-pr18828.so.abi | 4550 +++++------ .../test-read-dwarf/test12-pr18844.so.abi | 7086 ++++++++--------- .../test-read-dwarf/test13-pr18894.so.abi | 1511 ++-- .../test-read-dwarf/test15-pr18892.so.abi | 2269 +++--- .../test-read-dwarf/test16-pr18904.so.abi | 48 +- .../test-read-dwarf/test21-pr19092.so.abi | 2782 +++---- .../test22-pr19097-libstdc++.so.6.0.17.so.abi | 140 +- .../test9-pr18818-clang.so.abi | 340 +- tools/abidw.cc | 2 +- tools/abipkgdiff.cc | 2 +- 24 files changed, 16697 insertions(+), 15374 deletions(-)