From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id mQrKMzrSgmq01CsAWB0awg (envelope-from ) for ; Mon, 17 Aug 2026 05:19:54 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=humkgGm/; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id CFF9B1E033; Mon, 17 Aug 2026 05:19:54 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id E909B1E033 for ; Mon, 17 Aug 2026 05:19:53 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9E4DA4BA23E4 for ; Mon, 17 Aug 2026 09:19:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9E4DA4BA23E4 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=humkgGm/ Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id C33024BA2E0A for ; Mon, 17 Aug 2026 09:19:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C33024BA2E0A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C33024BA2E0A Authentication-Results: sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786958362; cv=none; b=h7bt95gNW/Xg+pYBie8fOlDvCozwwkZuoiyPGGgAyoJUSKrBoTvjcIbxrYncqmJRXdKS4jhJtufyHlTg3Ux7InlfpAHjbg+T5pqbxnAdtFLVvvlHlBW+a/6k/o/1LT/nVSbl3tKQ8GJMtIKdJzVJRPWJGSnRdeV8sD2l0KeY7ZA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786958362; c=relaxed/simple; bh=C3TtAhP/ZG5wjBs/3XrRDgX/WEjX8wGcYs7StOlXts8=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=k6Go6zhQKIlhNrWeDEsoAx8k7AnQ7wX3zm8UXxU03QiyoKzfEzEANzN5mBFH61xHqw9sYGydvoRdA1AplvfIrUVIhm+oQtYO18DPfObSJQXQ0I1RzEpnMnxI93K+bAmT7h65eN66abuev1dMQ8s2C1N5fyROyX7ytKgIIFchF0w= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=humkgGm/ DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C33024BA2E0A Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DE4661655; Mon, 17 Aug 2026 02:19:16 -0700 (PDT) Received: from [10.1.23.143] (K775M2XVT2.cambridge.arm.com [10.1.23.143]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A8A053F673; Mon, 17 Aug 2026 02:19:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1786958360; bh=C3TtAhP/ZG5wjBs/3XrRDgX/WEjX8wGcYs7StOlXts8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=humkgGm/Hy74dWncO2yxhgTyAMSvX7tydkPLTn8rnKcx+2dOL+54yrsDZylgVMCpK DISpf1UE/PtbCpe+oZrO3JIr2dQNqQ/d2Pj5aeSHAZUVT3WwCDRTk7dF6V8c8aHCPl B75dYl5RAlX4CteUWw//PX5+M9rL//x4+2hVhG3c= Message-ID: <4ceccaac-8d04-4c13-8d73-2cd5c5643980@arm.com> Date: Mon, 17 Aug 2026 10:19:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 0/2] gdb: Fix internal inferior calls through GNU IFUNCs To: Kevin Buettner Cc: gdb-patches@sourceware.org, Wilco Dijkstra , Yury Khrustalev , Thiago Jung Bauermann , Adhemerval Zanella Netto , Carlos O'Donell , Simon Marchi , Andrew Burgess References: <20260811131219.510776-1-muhammad.kamran@arm.com> <20260816002317.2a44f116@f44-mesa-1> Content-Language: en-GB From: Muhammad Kamran In-Reply-To: <20260816002317.2a44f116@f44-mesa-1> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 16/08/2026 08:24, Kevin Buettner wrote: > On Tue, 11 Aug 2026 13:12:17 +0000 > Muhammad Kamran wrote: > >> This series fixes a GDB inferior-call issue exposed by malloc being a GNU >> IFUNC in glibc on AArch64. The underlying problem is not AArch64-specific: >> it can affect any inferior helper found through find_function_in_inferior's >> minimal-symbol fallback when that helper is a GNU IFUNC. >> >> GDB calls find_function_in_inferior ("malloc") when expression evaluation >> needs to allocate memory in the inferior, for example for string literal >> arguments. In the minimal-symbol fallback, GDB created a synthetic ordinary >> function pointer from the minimal symbol address. If the symbol was a GNU >> IFUNC, this lost the IFUNC marker, so call_function_by_hand did not resolve >> the symbol before calling it. >> >> Patch 1 checks the minimal symbol kind directly and propagates the GNU IFUNC >> marker to the synthetic function type for mst_text_gnu_ifunc and >> mst_data_gnu_ifunc symbols. The existing fallback address and return type >> are unchanged. >> >> Patch 2 fixes the follow-on return-type issue after IFUNC resolution. When >> the resolved target type, or the type inferred from the resolver return type, >> does not provide a usable return type, find_function_addr now keeps the >> original function type's return type. This preserves the synthetic fallback >> return type used by find_function_in_inferior ("malloc"). >> >> The tests add an internal inferior-call case using an IFUNC malloc and run it >> through the existing gdb.base/gnu-ifunc.exp matrix for resolver attr, >> resolver debug info, and resolved-target debug info. >> >> Changes since v4: >> * Address feedback from Andrew Burgess . >> >> Changes since v3: >> * Move the ifunc resolver into a shared library. >> >> Changes since v2: >> * Rework the minimal-symbol fallback to check the minimal symbol kind >> directly as suggested by Simon. >> * Add coverage for both debug and no-debug IFUNC malloc variants by >> using the existing framework. >> * Preserve the original IFUNC return type when the resolved target type >> is unknown. > > Andrew gave conditional approval for both parts in his v4 replies. > I've looked over this v5 series; IMO, you've completely addressed his > concerns. Therefore, I think you can consider this version approved; > but do add Andrew's Approved-By tag. If you need a maintainer to push > it for you, I'll be happy to do that. Hi Kevin, Thanks for reviewing. I don't have write access, so I'd appreciate it if you could please push the series for me. Andrew gave his Approved-By on both patches, so please feel free to add: Approved-By: Andrew Burgess Thanks, Kamran > > Reviewed-By: Kevin Buettner >