From patchwork Tue Feb 7 17:36:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 64458 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 B385F3858C60 for ; Tue, 7 Feb 2023 17:36:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B385F3858C60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1675791383; bh=02zJ8SRY6v/tFEA2aCNAd5QdRWlToRxQ9ABvv+Cl2oI=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Help:List-Subscribe:From:Reply-To:From; b=tYcUG8AHODHXjvLAAKSVO89XLXiLbmoYsglEKDOnn0xhT44NjaP0fCormvjRIUaHE QbtlIm5Y3ARV24lApJ6zNB+N6a7x5FsQX7fnxQdEhKRptYF54BuHLfiujKRMB5TlFG SsUwlASaADoYltsBITihZOh9AsSjuCZiDusvMSHk= 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.129.124]) by sourceware.org (Postfix) with ESMTPS id CF67E3858D33 for ; Tue, 7 Feb 2023 17:36:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CF67E3858D33 Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-539--uPabORXMOmw0hEVbf8vpA-1; Tue, 07 Feb 2023 12:36:14 -0500 X-MC-Unique: -uPabORXMOmw0hEVbf8vpA-1 Received: by mail-qk1-f197.google.com with SMTP id a198-20020ae9e8cf000000b007259083a3c8so10258556qkg.7 for ; Tue, 07 Feb 2023 09:36:14 -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:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=02zJ8SRY6v/tFEA2aCNAd5QdRWlToRxQ9ABvv+Cl2oI=; b=R7qbl73AxwtSY2xZmcDhJooXKaLce+Cm+U70pmacWMN5Me3VUw+2iSF2wCG5+CTp8P 2JbvUFZ941YnvFo4UxYfMlSaguuyZHLXNnpjIwjHbb3zALjUQSlo6fEJhUM2dG11bvXE YQNjsbg6R/C/C67bxCIQVn3uj3zQaSTmxAAKeUuI/t4UGLWS6FK/BrVQqUqW+EuUZ5SP sZ7XrGf2cDmIpFFEwoEHbIjCrrBqxzsnlJkuJk0LP4pGLyisjbCFYw3/9tOiH3I0EtNp rGN4PcKg8y35aQtWut5B+DLD5gmwdSaU4utSH4AvKb0xFpfK0MlyMOajlmkfIoQ7YrzY LkcA== X-Gm-Message-State: AO0yUKXBGKrwOvQFryRYuY76ucRf7yzSxTAGCIUDT85Pm311ASYGkhDH Q2VokIcAd+K4lrHIOJgPL0IOP58xxFWIEiKo9bIdLzskEw28bPmn8iE5/+F9biA7LnQrB6Gjld3 r3B2wp798kiWlEvvcMZrPOocMtg== X-Received: by 2002:a05:622a:4f:b0:3b2:365c:9a9e with SMTP id y15-20020a05622a004f00b003b2365c9a9emr7079035qtw.61.1675791373137; Tue, 07 Feb 2023 09:36:13 -0800 (PST) X-Google-Smtp-Source: AK7set+0qzb3HFq9J8tBM5t0UgB9ziK1T1601fUsZ8d7lVoB2pb0djShdLYhUnD/4ctg1vPl53n1Gg== X-Received: by 2002:a05:622a:4f:b0:3b2:365c:9a9e with SMTP id y15-20020a05622a004f00b003b2365c9a9emr7078971qtw.61.1675791372608; Tue, 07 Feb 2023 09:36:12 -0800 (PST) Received: from localhost ([88.120.130.27]) by smtp.gmail.com with ESMTPSA id h17-20020ac85e11000000b003a5c6ad428asm9868552qtx.92.2023.02.07.09.36.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Feb 2023 09:36:12 -0800 (PST) Received: by localhost (Postfix, from userid 1000) id 6E3E4581C59; Tue, 7 Feb 2023 18:36:09 +0100 (CET) To: gprocida@google.com Cc: libabigail@sourceware.org Subject: [PATCH, RFC] PR30048 - wrong pretty representation of qualified pointers Organization: Red Hat / France X-Operating-System: Fedora 38 X-URL: http://www.redhat.com Date: Tue, 07 Feb 2023 18:36:09 +0100 Message-ID: <871qn1nzsm.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=-10.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, LOTS_OF_MONEY, 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 patch is a candidate fix for the problem reported at https://sourceware.org/bugzilla/show_bug.cgi?id=30048 and I'd be glad to your feedback. A qualified type is textually represented as the following: were "qualifier" is the qualifier carried by the qualified type and "underlying-type" is the type being qualified. In this case, the qualifier prefixes the textual representation of the qualified type. This is true if the underlying type of the qualified type is a non-const, non-reference type. For instance: const int; But when the underlying type is a pointer, then the qualified type is represented as: int* const; In that later case, the qualifier comes /after/ the textual representation of the underlying type. Now suppose the underlying type is itself a qualified type. In that case, for a non-const underlying type, we'd have, e.g: const volatile int; where the qualifier precedes the qualified type (which is itself a qualified type) /IF/ the ultimate underlying type (a.k.a the leaf underlying type) is itself a non-const, non-reference type. But if the ultimate underlying type is a pointer, a qualified type with an underlying qualified type would be textually represented as, e.g: int* const volatile; In other words, if the leaf type is a pointer, the qualifier suffixes the textual representation the underlying qualified type. Libabigail is failing to apply this later rule. As the type name is used as a key to cache IR nodes of DIEs (among other things), getting it wrong can lead to a bumpy ride down the road. Fixed thus. * src/abg-dwarf-reader.cc (die_is_pointer_array_or_reference_type): Rename die_is_pointer_or_reference_type into this. This new name reflects more what the function does as it tests if a DIE is for pointer, an array or a reference. (pointer_or_qual_die_of_anonymous_class_type): Adjust to use the newly (and better) named die_is_pointer_array_or_reference_type. (die_is_pointer_or_reference_type): Make this really test if a DIE is for a pointer or a reference. Now the name matches what the function does. (die_peel_qualified): Define new function. (die_qualified_type_name): When a qualified name Q has another qualified name as its underlying type, it's important to know if the leaf type is a pointer type or not to know how to construct the name of Q. This change now peels the potential qualifiers from the underlying type of the qualified type to see if the leaf type is a pointer or not. * src/abg-ir.cc (get_name_of_qualified_type): Likewise. Also, the name of array types doesn't follow the same rule as for pointers and references. * tests/data/test-abidiff-exit/PR30048-test-report-0.txt: Add new reference test output. * tests/data/test-abidiff-exit/PR30048-test-v{0,1}.c: Add source code of binary input data. * tests/data/test-abidiff-exit/PR30048-test-v{0,1}.o: Add binary input data. * tests/data/Makefile.am: Add the new test material above to source distribution. * tests/test-abidiff-exit.cc (in_out_specs): Add the input binaries to this test harness. * tests/data/test-abidiff-exit/qualifier-typedef-array-report-1.txt: Adjust. Signed-off-by: Dodji Seketeli OK to apply to mainline? --- src/abg-dwarf-reader.cc | 65 ++++++++++++++++-- src/abg-ir.cc | 5 +- tests/data/Makefile.am | 5 ++ .../PR30048-test-report-0.txt | 19 +++++ .../data/test-abidiff-exit/PR30048-test-v0.c | 12 ++++ .../data/test-abidiff-exit/PR30048-test-v0.o | Bin 0 -> 2784 bytes .../data/test-abidiff-exit/PR30048-test-v1.c | 6 ++ .../data/test-abidiff-exit/PR30048-test-v1.o | Bin 0 -> 2608 bytes .../qualifier-typedef-array-report-1.txt | 40 +++++------ tests/test-abidiff-exit.cc | 11 +++ 10 files changed, 134 insertions(+), 29 deletions(-) create mode 100644 tests/data/test-abidiff-exit/PR30048-test-report-0.txt create mode 100644 tests/data/test-abidiff-exit/PR30048-test-v0.c create mode 100644 tests/data/test-abidiff-exit/PR30048-test-v0.o create mode 100644 tests/data/test-abidiff-exit/PR30048-test-v1.c create mode 100644 tests/data/test-abidiff-exit/PR30048-test-v1.o new file mode 100644 index 00000000..21499acc index d45c9c6c..8172c568 100644 diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc index ce6b52d4..79322490 100644 --- a/src/abg-dwarf-reader.cc +++ b/src/abg-dwarf-reader.cc @@ -424,6 +424,9 @@ pointer_or_qual_die_of_anonymous_class_type(const Dwarf_Die* die); static bool die_is_reference_type(const Dwarf_Die* die); +static bool +die_is_pointer_array_or_reference_type(const Dwarf_Die* die); + static bool die_is_pointer_or_reference_type(const Dwarf_Die* die); @@ -570,6 +573,9 @@ die_function_signature(const reader& rdr, static bool die_peel_qual_ptr(Dwarf_Die *die, Dwarf_Die& peeled_die); +static bool +die_peel_qualified(Dwarf_Die *die, Dwarf_Die& peeled_die); + static bool die_function_type_is_method_type(const reader& rdr, const Dwarf_Die *die, @@ -6912,7 +6918,7 @@ die_is_pointer_type(const Dwarf_Die* die) static bool pointer_or_qual_die_of_anonymous_class_type(const Dwarf_Die* die) { - if (!die_is_pointer_or_reference_type(die) + if (!die_is_pointer_array_or_reference_type(die) && !die_is_qualified_type(die)) return false; @@ -6970,11 +6976,20 @@ die_is_array_type(const Dwarf_Die* die) /// /// @return true iff @p die represents a pointer or reference type. static bool -die_is_pointer_or_reference_type(const Dwarf_Die* die) +die_is_pointer_array_or_reference_type(const Dwarf_Die* die) {return (die_is_pointer_type(die) || die_is_reference_type(die) || die_is_array_type(die));} +/// Test if a DIE represents a pointer or a reference type. +/// +/// @param die the die to consider. +/// +/// @return true iff @p die represents a pointer or reference type. +static bool +die_is_pointer_or_reference_type(const Dwarf_Die* die) +{return (die_is_pointer_type(die) || die_is_reference_type(die));} + /// Test if a DIE represents a pointer, a reference or a typedef type. /// /// @param die the die to consider. @@ -6983,7 +6998,7 @@ die_is_pointer_or_reference_type(const Dwarf_Die* die) /// typedef type. static bool die_is_pointer_reference_or_typedef_type(const Dwarf_Die* die) -{return (die_is_pointer_or_reference_type(die) +{return (die_is_pointer_array_or_reference_type(die) || dwarf_tag(const_cast(die)) == DW_TAG_typedef);} /// Test if a DIE represents a class type. @@ -7225,6 +7240,38 @@ die_peel_qual_ptr(Dwarf_Die *die, Dwarf_Die& peeled_die) return true; } +/// Return the leaf object under a qualified type DIE. +/// +/// @param die the DIE of the type to consider. +/// +/// @param peeled_die out parameter. Set to the DIE of the leaf +/// object iff the function actually peeled anything. +/// +/// @return true upon successful completion. +static bool +die_peel_qualified(Dwarf_Die *die, Dwarf_Die& peeled_die) +{ + if (!die) + return false; + + memcpy(&peeled_die, die, sizeof(peeled_die)); + + int tag = dwarf_tag(&peeled_die); + + bool result = false; + while (tag == DW_TAG_const_type + || tag == DW_TAG_volatile_type + || tag == DW_TAG_restrict_type) + { + if (!die_die_attribute(&peeled_die, DW_AT_type, peeled_die)) + break; + tag = dwarf_tag(&peeled_die); + result = true; + } + + return result; +} + /// Return the leaf object under a typedef type DIE. /// /// @param die the DIE of the type to consider. @@ -9096,9 +9143,15 @@ die_qualified_type_name(const reader& rdr, repr.clear(); else { - if (has_underlying_type_die - && die_is_pointer_or_reference_type(&underlying_type_die)) - repr = underlying_type_repr + " " + repr; + if (has_underlying_type_die) + { + Dwarf_Die peeled; + die_peel_qualified(&underlying_type_die, peeled); + if (die_is_pointer_or_reference_type(&peeled)) + repr = underlying_type_repr + " " + repr; + else + repr += " " + underlying_type_repr; + } else repr += " " + underlying_type_repr; } diff --git a/src/abg-ir.cc b/src/abg-ir.cc index 4a598bde..ff7573ea 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -8740,9 +8740,8 @@ get_name_of_qualified_type(const type_base_sptr& underlying_type, if (!quals_repr.empty()) { - if (is_pointer_type(underlying_type) - || is_reference_type(underlying_type) - || is_array_type(underlying_type)) + if (is_pointer_type(peel_qualified_type(underlying_type)) + || is_reference_type(peel_qualified_type(underlying_type))) { name += " "; name += quals_repr; diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index a4740e3e..00b8126b 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -248,6 +248,11 @@ test-abidiff-exit/btf/test0-v0.c \ test-abidiff-exit/btf/test0-v0.o \ test-abidiff-exit/btf/test0-v1.c \ test-abidiff-exit/btf/test0-v1.o \ +test-abidiff-exit/PR30048-test-report-0.txt \ +test-abidiff-exit/PR30048-test-v0.c \ +test-abidiff-exit/PR30048-test-v1.c \ +test-abidiff-exit/PR30048-test-v0.o \ +test-abidiff-exit/PR30048-test-v1.o \ \ test-diff-dwarf/test0-v0.cc \ test-diff-dwarf/test0-v0.o \ diff --git a/tests/data/test-abidiff-exit/PR30048-test-report-0.txt b/tests/data/test-abidiff-exit/PR30048-test-report-0.txt new file mode 100644 index 00000000..23a4c10b --- /dev/null +++ b/tests/data/test-abidiff-exit/PR30048-test-report-0.txt @@ -0,0 +1,19 @@ +Functions changes summary: 0 Removed, 0 Changed, 0 Added function +Variables changes summary: 0 Removed, 1 Changed, 0 Added variable + +1 Changed variable: + + [C] 'S s' was changed at PR30048-test-v1.c:6:1: + size of symbol changed from 56 to 16 + type of variable changed: + type size changed from 448 to 128 (in bits) + 5 data member deletions: + 'int (int)* f01', at offset 0 (in bits) at PR30048-test-v0.c:2:1 + 'int (const int*)* f02', at offset 64 (in bits) at PR30048-test-v0.c:3:1 + 'int (int* const)* f03', at offset 128 (in bits) at PR30048-test-v0.c:4:1 + 'int (int* restrict)* f04', at offset 192 (in bits) at PR30048-test-v0.c:5:1 + 'int (const int* restrict)* f05', at offset 256 (in bits) at PR30048-test-v0.c:6:1 + 2 data member changes: + 'int (int* restrict const)* f06' offset changed from 320 to 0 (in bits) (by -320 bits) + 'int (int* restrict const)* f07' offset changed from 384 to 64 (in bits) (by -320 bits) + diff --git a/tests/data/test-abidiff-exit/PR30048-test-v0.c b/tests/data/test-abidiff-exit/PR30048-test-v0.c new file mode 100644 index 00000000..b00f6d7d --- /dev/null +++ b/tests/data/test-abidiff-exit/PR30048-test-v0.c @@ -0,0 +1,12 @@ +struct S { + int (*f01)(int); + int (*f02)(const int*); + int (*f03)(int* const); + int (*f04)(int* restrict); + int (*f05)(const int* restrict); + int (*f06)(int* restrict const); + int (*f07)(int* const restrict); +}; + +struct S s; + diff --git a/tests/data/test-abidiff-exit/PR30048-test-v0.o b/tests/data/test-abidiff-exit/PR30048-test-v0.o new file mode 100644 index 0000000000000000000000000000000000000000..91e136f4e8d9a108aed18b7af55d92415ef5c1d4 GIT binary patch literal 2784 zcmbtU&2Jk;6o2F0b=F?eCN+hY0@)x+(+aOYY7!HaVks(Z1VU92=diZd&VoN8dsAG2 z#EnY@LI{a#4~PpFgoL>Ez=aDJE?oEr5SN}g!26A7ob6?CU{u}Yk-s!Yq`_&HgM_2n{WHOwJpC^59&e9 zuUG5!TCHC5H*QB=|7Mt|K)G?*FAtNWQMA*KM$shhup3S~2RpOoW_h#Wm-}?<_SI^& z(JUv?G%4Sy1|6y#jE7OBJMO+4SNd^M8N}_d9rwd{Q0c|9Xj(z)w9*ZeP{J}tyK%2q zj%IQ4KdVpf<|IQmc6Yb^4L*a*|Kb4TdD*OeejI+dj&DRf0H;MLUmmt5Gc4jZJ^U*p zL>5P~#Nux%ODrm6(cFipGD9qS>;%j6N2^?+rK!QmQ=1~BXRyflxQb|5)q%$uX*r_+ z`1D&mVemTdsT7|+jf?7FVdVcx<>{X2pBis^F4YG)x0L^)!GEg!n!(>!J_Xae!z668 zO(t`DpivUd5(+TI6tt&P3MSDY47ySKsJ|bNdSi}B9Jbq&=*}bIa1xIC(W51UcogXp zUP43A`_k`>hr@_}m%(V9L;+7>d76Zs_mtls9R-Jz@nJMc?&{6|cYA?Lan|~Lb*GjF zhE>`EvO7J>o0K*X6>Kq7jvq5`O0d8`!stZ)`DUQjG*BX<^=QC;wLRL zHI$zza)m7@{axUX4cXzx>PwXGx zlezycb7oJbsF;H$+MJt(HgoqmlC{3C*1xGLu|ED{=K6=sp=Xt!w6xUvc)zsh^|k$g zgIV?WRQ-49VwDR@*WXjvTz^LmWCh77(RJE>!7+_fX*4hgS_RGAub9WZsO>IV9IASA zU;6xXBKn!Nh}~E958$w@@{@J{xRb1{zJp6;IXgECZSEg^v+57j{r|A2oCCA|Z!wtY AYXATM literal 0 HcmV?d00001 diff --git a/tests/data/test-abidiff-exit/PR30048-test-v1.c b/tests/data/test-abidiff-exit/PR30048-test-v1.c --- /dev/null +++ b/tests/data/test-abidiff-exit/PR30048-test-v1.c @@ -0,0 +1,6 @@ +struct S { + int (*f06)(int* restrict const); + int (*f07)(int* const restrict); +}; + +struct S s; diff --git a/tests/data/test-abidiff-exit/PR30048-test-v1.o b/tests/data/test-abidiff-exit/PR30048-test-v1.o new file mode 100644 index 0000000000000000000000000000000000000000..161e45656fc168d917eae9b9bca9465786d35205 GIT binary patch literal 2608 zcmbtW-EI>{6h5R72p$5ixhUsb&)CakE1~vCGv}P|{LP*@WBK7%U*E8V zAWed<(L~cI(I7vO>xo#W5}lx*S2$EGRwEzJp0sIxBGm1VLdEG({&4Y5G^ zJIt`Ae&CI!bNR3rlLe%3kGJA|-mE%rGZBfYnU7g2CWTnwRI_9k))vK8=gY<7W@*)7 z=i}ro7B)+Ko_X=%&$iE)3nAVdn*~F2d9kpN^w|;% z*6~rAB+1QhzH>LKD{i&s*ZitmtJG@MYOU&CzAIbqtsqtgZ|REbb>qFBT<^%99EMF+ zgJE-L{a|(3TV8U#4sG52qEcB}^gmHN{Yy^$46NJ0v zc6cD8GF+o_D~N+c^w`=8+ig!Cgz^83K6;v?2;JP+SaUCP53amN1JJJ=FP9g_lf(Ez z#33+ELg`7bHJHI+&(Z6DGE6+z>5LN(o2Dj8O0ub#(k7x!Jf0b3(+5XT9!8oUy{N=C zr#+4~ErLmp;0()?=Rq{9;(((^nocMIc={_&8MyZQD21oHv9ECSZ(7M7N_;Bc)dj{CB03A3f;CL4$cb9Pu43#quB~A45!jBZ|l$%H6s=yl|~A-iEu>JToWMZnvM-t2d~l7F@QUO$#TPoWpZLGvf2cY1sN zVAvnXVf;WJ{=f6H9Ex7+{_0G1Eg0OK`$e_`OV0>G>ew>KjK9P_n6-b4AJ3`EW$L(3 zGbdc@*q9!U*myU6F(;V6`q*P6yif;vtZ>wYpMDqk!3M4KGIIidj*aP;5gYHO?-pB3 z49-^-=t4=6>3f@PS?B*=Jt}=poFDJWJb#NZGbclIUxCX|Qe^sWvn{LsK-IscVo@Kz zVrKmTW5`+Im8K`E5WX)>y1wT4zmOIGQaSvU4pzQ^bo{SMHtRpK;6+p(vGK0sH2;k) zS{^&G@Jz+0G03LxAB^E%O!q?tnCH^{LoN{VnX$lMDew>q(>$-N`^TM_Zx8-|D)1zf V6q)Bo-mLhi>i+*u#X>aW-vSvc)T#gg literal 0 HcmV?d00001 diff --git a/tests/data/test-abidiff-exit/qualifier-typedef-array-report-1.txt b/tests/data/test-abidiff-exit/qualifier-typedef-array-report-1.txt --- a/tests/data/test-abidiff-exit/qualifier-typedef-array-report-1.txt +++ b/tests/data/test-abidiff-exit/qualifier-typedef-array-report-1.txt @@ -47,39 +47,39 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added variable underlying type 'typedef A' at qualifier-typedef-array-v0.c:1:1 changed: entity changed from 'typedef A' to compatible type 'void*[7]' type of 'C v_c' changed: - entity changed from 'typedef C' to compatible type 'const volatile void*[7]' + entity changed from 'typedef C' to compatible type 'void* const volatile[7]' array element type 'void* const' changed: - 'void* const' changed to 'const volatile void*' - type name changed from 'void* const[7]' to 'const volatile void*[7]' + 'void* const' changed to 'void* const volatile' + type name changed from 'void* const[7]' to 'void* const volatile[7]' type size hasn't changed type of 'C r_c' changed: - entity changed from 'typedef C' to compatible type 'restrict const void*[7]' + entity changed from 'typedef C' to compatible type 'void* restrict const[7]' array element type 'void* const' changed: - 'void* const' changed to 'restrict const void*' - type name changed from 'void* const[7]' to 'restrict const void*[7]' + 'void* const' changed to 'void* restrict const' + type name changed from 'void* const[7]' to 'void* restrict const[7]' type size hasn't changed type of 'D v_d' changed: - entity changed from 'typedef D' to compatible type 'const volatile void*[7]' + entity changed from 'typedef D' to compatible type 'void* const volatile[7]' array element type 'void* const' changed: - 'void* const' changed to 'const volatile void*' - type name changed from 'void* const[7]' to 'const volatile void*[7]' + 'void* const' changed to 'void* const volatile' + type name changed from 'void* const[7]' to 'void* const volatile[7]' type size hasn't changed type of 'D r_d' changed: - entity changed from 'typedef D' to compatible type 'restrict const void*[7]' + entity changed from 'typedef D' to compatible type 'void* restrict const[7]' array element type 'void* const' changed: - 'void* const' changed to 'restrict const void*' - type name changed from 'void* const[7]' to 'restrict const void*[7]' + 'void* const' changed to 'void* restrict const' + type name changed from 'void* const[7]' to 'void* restrict const[7]' type size hasn't changed type of 'E r_e' changed: - entity changed from 'typedef E' to compatible type 'restrict const volatile void*[7]' - array element type 'const volatile void*' changed: - 'const volatile void*' changed to 'restrict const volatile void*' - type name changed from 'const volatile void*[7]' to 'restrict const volatile void*[7]' + entity changed from 'typedef E' to compatible type 'void* restrict const volatile[7]' + array element type 'void* const volatile' changed: + 'void* const volatile' changed to 'void* restrict const volatile' + type name changed from 'void* const volatile[7]' to 'void* restrict const volatile[7]' type size hasn't changed type of 'F r_f' changed: - entity changed from 'typedef F' to compatible type 'restrict const volatile void*[7]' - array element type 'const volatile void*' changed: - 'const volatile void*' changed to 'restrict const volatile void*' - type name changed from 'const volatile void*[7]' to 'restrict const volatile void*[7]' + entity changed from 'typedef F' to compatible type 'void* restrict const volatile[7]' + array element type 'void* const volatile' changed: + 'void* const volatile' changed to 'void* restrict const volatile' + type name changed from 'void* const volatile[7]' to 'void* restrict const volatile[7]' type size hasn't changed diff --git a/tests/test-abidiff-exit.cc b/tests/test-abidiff-exit.cc index df2f087c..73f9c0d4 100644 --- a/tests/test-abidiff-exit.cc +++ b/tests/test-abidiff-exit.cc @@ -471,6 +471,17 @@ InOutSpec in_out_specs[] = "data/test-abidiff-exit/test-rhbz2114909-report-1.txt", "output/test-abidiff-exit/test-rhbz2114909-report-1.txt" }, + { + "data/test-abidiff-exit/PR30048-test-v0.o", + "data/test-abidiff-exit/PR30048-test-v1.o", + "", + "", + "", + "--no-default-suppression", + abigail::tools_utils::ABIDIFF_ABI_CHANGE, + "data/test-abidiff-exit/PR30048-test-report-0.txt", + "output/test-abidiff-exit/PR30048-test-report-0.txt" + }, #ifdef WITH_BTF { "data/test-abidiff-exit/btf/test0-v0.o",