From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by sourceware.org (Postfix) with ESMTPS id D1545395A431 for ; Thu, 19 Mar 2020 12:50:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D1545395A431 Received: by mail-wr1-x442.google.com with SMTP id h9so2787625wrc.8 for ; Thu, 19 Mar 2020 05:50:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=2qom5Oej86Q9/02PzMfauNk6lvUr8ev9jMz0hcPqPEs=; b=IrQVBU9cu/5TNp8ED+SIOqagHWvjV/RAEUzntm4wGQA984KtH++jmKmov5g1ZwmiMB S2H2A3OCVxkkJNmNJXbsy3NDjfTTZiqrhkxY3mAyxQfIBdAQ1yi5+0qVQCeVKuKImoGD tnbtOn8qvsy70qwl+c55Jjgg2Yf9T+eyupNXMlq1vzVdNypY27jHBFXlaPuWLi2Oy75A rDlTxR/Fx856ue1cZbX0KWeUbqgLvDHlB4OQKwnwvzTBeqdXyck3m2y1BlcC54HYHOEu Em+5mFVE8UAFD8OKZp1gj7/ILP+QsufQSIKQGybeKKYCzsy3NPCrMszPqS2FLVpXqhP2 e9YQ== X-Gm-Message-State: ANhLgQ1aCTSLPGwEGSsiGaqZqPD4gfNDMXblHdDyT4NRp7YMq7UyRSG4 ZE1jO0cvGxlVtMpv6LXkl1Pnp2oFy1QFPA== X-Google-Smtp-Source: ADFU+vvTP63ACIVeiyJLxa+u3UV+3pLnm43eYmBWBtbQPG4ywSp0fwvMq9tSSNolD53LXv2lbaC0Cw== X-Received: by 2002:adf:e550:: with SMTP id z16mr4365873wrm.394.1584622231425; Thu, 19 Mar 2020 05:50:31 -0700 (PDT) Received: from google.com ([2a00:79e0:d:210:e8f7:125b:61e9:733d]) by smtp.gmail.com with ESMTPSA id n1sm3339753wrj.77.2020.03.19.05.50.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2020 05:50:30 -0700 (PDT) Date: Thu, 19 Mar 2020 13:50:30 +0100 From: Matthias Maennich To: Giuliano Procida Cc: libabigail@sourceware.org, dodji@seketeli.org, kernel-team@android.com Subject: Re: [PATCH] abg-ir.cc: Fix peel_typedef_type(const type_base*). Message-ID: <20200319125030.GB254272@google.com> References: <20200319111315.162790-1-gprocida@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200319111315.162790-1-gprocida@google.com> User-Agent: Mutt/1.12.2 (2019-09-21) X-Spam-Status: No, score=-39.1 required=5.0 tests=DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, FSL_HELO_FAKE, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL 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: Libabigail mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Mar 2020 12:50:34 -0000 On Thu, Mar 19, 2020 at 11:13:14AM +0000, Android Kernel Team wrote: >The various peel_*_type functions are supposed to return either an >underlying type (when something can be "peeled") or the original >type (when not). > >This overload of peel_typedef_type currently returns null if the type >isn't a typedef. This patch corrects this. > >The bug hasn't bitten as all existing calls are protected by an >is_typedef check. Note that the recursive calls within the function >are to the other (const type_base_sptr&) overload. > > * src/abg-ir.cc (peel_typedef_type): In the const type_base* > overload, return the original argument rather than null if the > type isn't actually a typedef. > >Signed-off-by: Giuliano Procida Reviewed-by: Matthias Maennich Cheers, Matthias >--- > 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 83602b8a..27d493cc 100644 >--- a/src/abg-ir.cc >+++ b/src/abg-ir.cc >@@ -5249,7 +5249,7 @@ peel_typedef_type(const type_base* type) > { > const typedef_decl* t = is_typedef(type); > if (!t) >- return t; >+ return type; > > return peel_typedef_type(t->get_underlying_type()).get(); > } >-- >2.25.1.481.gfbce0eb801-goog > >