From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id xpbqG0FgzWl/oQIAWB0awg (envelope-from ) for ; Wed, 01 Apr 2026 14:13:21 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=fD0QTLj6; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=vgI4B1s7; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=fD0QTLj6; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=vgI4B1s7; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 5CEF81E0BC; Wed, 01 Apr 2026 14:13:21 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.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 36CC01E04F for ; Wed, 01 Apr 2026 14:13:20 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 8DBFB4BA2E2E for ; Wed, 1 Apr 2026 18:13:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8DBFB4BA2E2E Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=fD0QTLj6; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=vgI4B1s7; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=fD0QTLj6; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=vgI4B1s7 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) by sourceware.org (Postfix) with ESMTPS id 4CB1C4BA2E3B for ; Wed, 1 Apr 2026 18:12:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4CB1C4BA2E3B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4CB1C4BA2E3B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775067131; cv=none; b=w90NyIwj+mMDSo5y1kPkP0Wgh7+7Nrq3Mg+tEUhLJhipDEJfyEimWxKfIh84XRjeLelOBaAj+6Fdy7BN6z0dnOfH3EB1p8AzIxjg8126HuVos96bGn111DT7htpZVqlbLnVY5rVKJ017/sHcbPTC4/ltXCGC7ipkJtTeHyfWMvw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775067131; c=relaxed/simple; bh=YW/ADibhT7uSoDzAWzhN2daUmzklYgwOhJoFU+1s7WM=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:To:From; b=CUZTiWrvRegZc1xkZbSUN8AMeG6wMQesrjRnr5bTJVil8uxKkDvk4bLvP482fDsPRG9bGxxmPvk3hUF2PqmKNq0ZzSkb4YxaBoABF6yknApTTKj7zYjzDIl1r0VzyinZqV/6fVgpSiAS7yKaeoDGjt/sTOthw8HO9+i6Hoeo/uk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4CB1C4BA2E3B Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 56D974D2E7; Wed, 1 Apr 2026 18:12:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1775067130; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SsHFCRjq1/b2FuD1hkcgLx9x++C/6qpAvOZC8OWYCYE=; b=fD0QTLj62RlVuAR9qwPiV/uZ0vKhIbE935q1JlqM06dSaKKxcS1SPj3wv0sFOWbHBhO6xY IJBxQ2WsCz3QEDPwITZa9h0UTrcX7OtnqLmQX83cduSbCzT2HUnOkYLpJskji4zcxMEHt1 116+I5bCvydKW/QzBJyP6s1MuYgjAh4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1775067130; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SsHFCRjq1/b2FuD1hkcgLx9x++C/6qpAvOZC8OWYCYE=; b=vgI4B1s7xbeUeDppMwYAhORsOqY7P8T+ZpVCqeX8NfX6NVDcXwlk91Jhbl9DvZ6qcfYqHY sFTY2nbnAYFgNCDw== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1775067130; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SsHFCRjq1/b2FuD1hkcgLx9x++C/6qpAvOZC8OWYCYE=; b=fD0QTLj62RlVuAR9qwPiV/uZ0vKhIbE935q1JlqM06dSaKKxcS1SPj3wv0sFOWbHBhO6xY IJBxQ2WsCz3QEDPwITZa9h0UTrcX7OtnqLmQX83cduSbCzT2HUnOkYLpJskji4zcxMEHt1 116+I5bCvydKW/QzBJyP6s1MuYgjAh4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1775067130; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SsHFCRjq1/b2FuD1hkcgLx9x++C/6qpAvOZC8OWYCYE=; b=vgI4B1s7xbeUeDppMwYAhORsOqY7P8T+ZpVCqeX8NfX6NVDcXwlk91Jhbl9DvZ6qcfYqHY sFTY2nbnAYFgNCDw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 3B5E34A0B0; Wed, 1 Apr 2026 18:12:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id /8pGDfpfzWkWZQAAD6G6ig (envelope-from ); Wed, 01 Apr 2026 18:12:10 +0000 Message-ID: <7074c98a-be49-48c6-bb92-047671dbd5d5@suse.de> Date: Wed, 1 Apr 2026 20:12:09 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] testsuite: ada-valprint-error relocation issue To: Bratislav Filipovic Cc: gdb-patches@sourceware.org, simon.marchi@efficios.com References: <82b0b090-0f2e-4abc-9e74-6d4ce3d242f4@suse.de> <20260401144007.4026084-1-bfilipov@amd.com> Content-Language: en-US From: Tom de Vries In-Reply-To: <20260401144007.4026084-1-bfilipov@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-4.30 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-0.988]; MIME_GOOD(-0.10)[text/plain]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:mid] 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 4/1/26 4:10 PM, Bratislav Filipovic wrote: > The ada-valprint-error.exp test links a nodebug .o file with a separate > DWARF .o file generated by lib/dwarf.exp. This requires the linker to > apply relocations for initialized pointers in the .data section. > > Some clang + linker combinations fail to apply these relocations, > leaving fd__global as NULL instead of pointing to buffer. This causes > the test to print null instead of the expected error message. > > Binary evidence from .comment section confirms which compiler and > linker were used. Testing shows: > - GCC 13 + GNU ld 2.42: PASS > - clang 20 + GNU ld 2.42: FAIL > - clang 22 + ld.lld 22: FAIL > - clang 17/19 + GNU ld 2.45.0: PASS > > The failure is a linker limitation when handling this specific > relocation pattern, not a GDB bug. Document this in the test file > to help users understand why the test may fail with certain toolchains. Hi, the patch LGTM, but I'm wondering, do you have a copyright assignment, or are you covered by an AMD blanket assignment perhaps? Thanks, - Tom > --- > .../gdb.dwarf2/ada-valprint-error.exp | 21 +++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp b/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp > index f3d61e91..00e737bc 100644 > --- a/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp > +++ b/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp > @@ -107,6 +107,27 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} \ > return -1 > } > > +# Note: This test may fail with certain clang + linker combinations > +# Specifically, clang + ld.lld can fail to apply relocations when linking > +# nodebug .o with separate DWARF .o, leaving fd__global as NULL instead > +# of pointing to buffer. The failure is a linker limitation, not a GDB bug. > +# > +# Known to fail: clang 20/22 + GNU ld 2.42, clang 22 + ld.lld 22 > +# Known to pass: GCC + GNU ld, clang 17/19 + GNU ld 2.45.0 > +set unsupported 0 > +gdb_test_multiple "print /x fd__global" "check fd__global value" { > + -re -wrap "@0x0: 0x0" { > + set unsupported 1 > + } > + -re -wrap "" { > + pass $gdb_test_name > + } > +} > +if {$unsupported} { > + unsupported "linker failed to apply relocation for fd__global" > + return > +} > + > gdb_test_no_output "set language ada" > > gdb_test "print fd.global" \