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 BE8A43858C50 for ; Fri, 22 Jul 2022 23:19:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BE8A43858C50 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.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-541-qyk0YNTuMVOO9jva0OOOLA-1; Fri, 22 Jul 2022 19:19:19 -0400 X-MC-Unique: qyk0YNTuMVOO9jva0OOOLA-1 Received: by mail-qt1-f198.google.com with SMTP id ay25-20020a05622a229900b0031ef5fdf8f8so3607400qtb.7 for ; Fri, 22 Jul 2022 16:19:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:organization:date:message-id :user-agent:mime-version; bh=5Gzjx6p19S309la0yM7UPT28JffYxX0TavAnIbIgWYQ=; b=F4reP87MqcpQ6ZnyFRMLU8Ep1LjRLssTxIM6aeJeqqkCtzt4BoTGFvbZJ9OxIyL7fu NgUhd2+YMiJtLZltj4S11Zs0u9kmKR/RzVpifLB3/+t9IdAFllHzn/nnSw2CcDY6gpu+ sP1+3UslJLiQwwFzsmhomi4tB6vkiih7MmxItPBrecFWbzSrxQvnNnPYGFViwsJwIZpl soACaA632QvZzwClytYFMKNFd4g1gyPtg54eUYB3PwQdxrRhDN7Z3SyvhiuekxZ9WMEz yPFZfaIIDv4GtkaPVeZrEN7ld7OPTegqr8D/AxE/Hz27e/V6EYohSK3ltVTo21urCOyX Q2Rg== X-Gm-Message-State: AJIora+MEWophJHLICZKCBT/RIml/sHrfj+C5/7/cWl07vgdN0LDZL35 XeSoxKpdkNFW8qI0ZflhEQUf+Q/ntHy9IlZ6eUa9/3XLg412ALNZ1Np9PnGcOFtc/q4XBFQ5HxC OjqoPag3Gp2+x0Va09O+l1yb6xdXyrx04S37T02WUOsCMsZW72lkaUqgmlXBCyuswgakh X-Received: by 2002:ac8:7f83:0:b0:31f:35b:684d with SMTP id z3-20020ac87f83000000b0031f035b684dmr2154025qtj.510.1658531958581; Fri, 22 Jul 2022 16:19:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u22vvSSa3ZAiVY8IPPuKErexivn7k9txBZRGbRj8jIMKdm+99kkZvrkSjUwriSCqNR2lA2nQ== X-Received: by 2002:ac8:7f83:0:b0:31f:35b:684d with SMTP id z3-20020ac87f83000000b0031f035b684dmr2154014qtj.510.1658531958231; Fri, 22 Jul 2022 16:19:18 -0700 (PDT) Received: from localhost ([88.120.130.27]) by smtp.gmail.com with ESMTPSA id s6-20020a05620a0bc600b006af039ff090sm4034894qki.97.2022.07.22.16.19.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jul 2022 16:19:17 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id 64A94581C2F; Sat, 23 Jul 2022 01:19:15 +0200 (CEST) From: Dodji Seketeli To: libabigail@sourceware.org Subject: [PATCH 0/3] Make integral types of same base and size compatible Organization: Red Hat / France X-Operating-System: Fedora 37 X-URL: http://www.redhat.com Date: Sat, 23 Jul 2022 01:19:15 +0200 Message-ID: <87sfms91n0.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=-6.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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 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-List-Received-Date: Fri, 22 Jul 2022 23:19:22 -0000 Hello, On some platforms, 'long int' and 'long long int' have the same size. On those platforms, those two types should be considered ABI compatible. Today, libabigail always consider these types as different. This leads some spurious type changes, especially when, e.g, a type struct Foo is defined in two different translation unit, once using a "long long int" through a typedef, and once using a "long int" through a typedef. In that case, libabigail (wrongly) considers the two struct Foo as different. And that leads to weird and hard to debug self comparison failures down the road. For instance, the following command fails: $ time tools/fedabipkgdiff --debug --self-compare -a --from fc36 btrfs-progs Fixing this issue uncovers two other issues that needed fixing altogether. First, in some cases, the sorting of array types can be non-stable in the abixml output. This is due to some ambiguities that can happen with the representation of array element types. The first patch of the series address that. Second, some qualified types can be sometimes represented with redundant (and thus very confusing) CV-qualifiers. The second patch removes those and provides a hopefully less confusing pretty representation of qualified types. Below is the summary of the patch series that was applied to master. Dodji Seketeli (3): ir: Disambiguate sorting of array element types dwarf-reader: Remove redundant qualifiers from qualified types ir: Consider integral types of same kind and size as equivalent include/abg-fwd.h | 9 + include/abg-ir.h | 10 + src/abg-dwarf-reader.cc | 5 +- src/abg-ir-priv.h | 11 +- src/abg-ir.cc | 419 +- src/abg-reader.cc | 3 +- .../qualifier-typedef-array-report-1.txt | 40 +- tests/data/test-annotate/libtest23.so.abi | 748 +- .../test-annotate/libtest24-drop-fns-2.so.abi | 794 +- .../test-annotate/libtest24-drop-fns.so.abi | 794 +- tests/data/test-annotate/test0.abi | 48 +- .../data/test-annotate/test14-pr18893.so.abi | 2472 +- .../data/test-annotate/test15-pr18892.so.abi | 12362 +++-- .../data/test-annotate/test17-pr19027.so.abi | 2246 +- ...st18-pr19037-libvtkRenderingLIC-6.1.so.abi | 11742 +++-- ...19-pr19023-libtcmalloc_and_profiler.so.abi | 16188 +++--- ...st20-pr19025-libvtkParallelCore-6.1.so.abi | 16864 +++--- .../data/test-annotate/test21-pr19092.so.abi | 680 +- .../PR25058-liblttng-ctl-report-1.txt | 4 +- .../test-PR26739-2-report-0.txt | 10 +- .../PR22015-libboost_iostreams.so.abi | 3520 +- .../test-read-dwarf/PR22122-libftdc.so.abi | 3929 +- .../data/test-read-dwarf/PR25007-sdhci.ko.abi | 9147 ++-- .../PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi | 169 +- tests/data/test-read-dwarf/libtest23.so.abi | 708 +- .../libtest24-drop-fns-2.so.abi | 760 +- .../test-read-dwarf/libtest24-drop-fns.so.abi | 760 +- .../test-read-dwarf/test-libaaudio.so.abi | 348 +- .../test-read-dwarf/test-libandroid.so.abi | 1296 +- tests/data/test-read-dwarf/test0.abi | 47 +- tests/data/test-read-dwarf/test0.hash.abi | 13 +- tests/data/test-read-dwarf/test1.hash.abi | 4 +- .../test-read-dwarf/test10-pr18818-gcc.so.abi | 7328 ++- .../test-read-dwarf/test11-pr18828.so.abi | 14955 +++--- .../test-read-dwarf/test12-pr18844.so.abi | 25236 +++++---- .../test-read-dwarf/test14-pr18893.so.abi | 1580 +- .../test-read-dwarf/test15-pr18892.so.abi | 11647 +++-- .../test-read-dwarf/test16-pr18904.so.abi | 16732 +++--- .../test-read-dwarf/test17-pr19027.so.abi | 2056 +- ...st18-pr19037-libvtkRenderingLIC-6.1.so.abi | 11520 +++-- ...19-pr19023-libtcmalloc_and_profiler.so.abi | 15834 +++--- ...st20-pr19025-libvtkParallelCore-6.1.so.abi | 16406 +++--- .../test-read-dwarf/test21-pr19092.so.abi | 656 +- .../test22-pr19097-libstdc++.so.6.0.17.so.abi | 42542 ++++++++-------- .../test9-pr18818-clang.so.abi | 5412 +- tests/data/test-read-write/test22.xml | 7 +- tests/data/test-read-write/test23.xml | 7 +- .../test28-without-std-fns-ref.xml | 648 +- .../test28-without-std-vars-ref.xml | 590 +- 49 files changed, 129753 insertions(+), 129553 deletions(-) -- 2.36.1 Cheers, -- Dodji