From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id vGP+A8fPdGh9fDQAWB0awg (envelope-from ) for ; Mon, 14 Jul 2025 05:37:11 -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=J3JLDMSB; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=egNneQNa; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=J3JLDMSB; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=egNneQNa; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id EA15D1E11C; Mon, 14 Jul 2025 05:37:10 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-9.1 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,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 4306D1E0C2 for ; Mon, 14 Jul 2025 05:37:09 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A17ED385840F for ; Mon, 14 Jul 2025 09:37:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A17ED385840F 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=J3JLDMSB; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=egNneQNa; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=J3JLDMSB; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=egNneQNa 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 8003C3858410 for ; Mon, 14 Jul 2025 09:36:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8003C3858410 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 8003C3858410 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=1752485796; cv=none; b=DberCxRdlgibaAcKzh84L+0ziQIxP4EWf/4a2Lwb4nsOJQO+YS6ka9fTDpzbqnReOfo/n2TJrxt7JETv1JqSdXDNSvibSkcujM7IUVbFyi4IfUI3TElIu+pPIwRjrVLMA2wMTJWgN10rva8g19m+E6334O693Gktw00uHdlDK8k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1752485796; c=relaxed/simple; bh=lXhAkDlqzMWkVaTB70frhmi3vEHARfFWIavt7AUdcjo=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:To:From; b=A2ii8Ehs6qCQ1Fr4BkL6v4e/JwYPOUMU33QjgVQNrJyOAMX6aeMl2D9Qf+8XiQ+AZ/I2H9tcuF7TEbDw4DVjBCCqlVfDBFQNbTbEBm5S8/Qos1iG1Y4UwLiTCRmKwxz2yDje8NGGsR4bg4SE+BEuR1OGnIWqtRkAZsuTViwXYic= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8003C3858410 Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104: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 707512117A; Mon, 14 Jul 2025 09:36:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1752485795; 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=EKFT5+E1cS7kD9xcL2nkVrUEyZj6qfTA9AoEtbeO+nY=; b=J3JLDMSBU+3DnKaoUwravTEUTwTvoeeFkpfHIr8UzsB4u+8upKcqf3Emi5LVJxOk1FKpio 1Pv713QMDvcLOSOCuUiU+VRhrAd4zkz59iE1fyLy+IsWcE1raU7urmxcy+igZloV67itXg FFSxIETAhBJ4ySiSFI9sJypiDFGWmIc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1752485795; 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=EKFT5+E1cS7kD9xcL2nkVrUEyZj6qfTA9AoEtbeO+nY=; b=egNneQNaKWpTcKJ1WfYz5ctG8pCnkoCyePldHz7wlDFPUbAxHYMMdE5lvCgtPNG2SHAw4u AP2jSJLusi+oiwDg== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=J3JLDMSB; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=egNneQNa DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1752485795; 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=EKFT5+E1cS7kD9xcL2nkVrUEyZj6qfTA9AoEtbeO+nY=; b=J3JLDMSBU+3DnKaoUwravTEUTwTvoeeFkpfHIr8UzsB4u+8upKcqf3Emi5LVJxOk1FKpio 1Pv713QMDvcLOSOCuUiU+VRhrAd4zkz59iE1fyLy+IsWcE1raU7urmxcy+igZloV67itXg FFSxIETAhBJ4ySiSFI9sJypiDFGWmIc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1752485795; 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=EKFT5+E1cS7kD9xcL2nkVrUEyZj6qfTA9AoEtbeO+nY=; b=egNneQNaKWpTcKJ1WfYz5ctG8pCnkoCyePldHz7wlDFPUbAxHYMMdE5lvCgtPNG2SHAw4u AP2jSJLusi+oiwDg== 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 5579D138A1; Mon, 14 Jul 2025 09:36:35 +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 UO6EE6PPdGizQwAAD6G6ig (envelope-from ); Mon, 14 Jul 2025 09:36:35 +0000 Message-ID: Date: Mon, 14 Jul 2025 11:36:42 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] [gdb/build] Work around GCC ipa-modref bug To: Andrew Burgess , gdb-patches@sourceware.org References: <20250712131649.8372-1-tdevries@suse.de> <87h5zhmbyy.fsf@redhat.com> Content-Language: en-US From: Tom de Vries Cc: Richard Biener In-Reply-To: <87h5zhmbyy.fsf@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-4.51 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; TO_DN_SOME(0.00)[]; DNSWL_BLOCKED(0.00)[2a07:de40:b281:106:10:150:64:167:received]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; RCPT_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo, imap1.dmz-prg2.suse.org:rdns, suse.de:mid, suse.de:dkim, suse.de:email] X-Rspamd-Queue-Id: 707512117A X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action 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 7/12/25 21:43, Andrew Burgess wrote: > Tom de Vries writes: > >> PR mi/32571 reports the following problem: >> ... >> $ gdb -q -batch -ex "b bla.c:100" >> >> Make breakpoint pending on future shared library load? (y or [n]) \ >> [answered N; input not from terminal] >> ... >> while this is expected: >> ... >> $ gdb -q -batch -ex "b bla.c:100" >> No symbol table is loaded. Use the "file" command. >> Make breakpoint pending on future shared library load? (y or [n]) \ >> [answered N; input not from terminal] >> ... >> >> A few factors in reproducing this are building gdb using gcc 14, >> "-O2 -flto=auto" and --disable-nls. For more details, see the PR. >> >> This turns out to be caused by a GCC PR [1], more specifically a problem in >> ipa-modref. >> >> Work around this by disabling ipa-modref for GCC versions 12-15 and 16.0, >> assuming the GCC 16.1 release will contain a fix. > Hi Andrew, thanks for the review. > First, massive thanks for tracking this issue down. Likewise, thank you and every else who worked on tracking this down. In particular, I found your comment describing how you reproduced it in arch linux helpful, and it triggered me to try the same (but without using the package infrastructure), which was the first time I managed to reproduce it. >> Tested on aarch64-linux and x86_64-linux. >> >> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32571 >> >> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120987 >> --- >> gdbsupport/common-defs.h | 8 ++++++++ >> 1 file changed, 8 insertions(+) >> >> diff --git a/gdbsupport/common-defs.h b/gdbsupport/common-defs.h >> index 07caf3bd7e4..bdf04d9ec09 100644 >> --- a/gdbsupport/common-defs.h >> +++ b/gdbsupport/common-defs.h >> @@ -27,6 +27,14 @@ >> #pragma GCC optimize("-fno-hoist-adjacent-loads") >> #endif >> >> +#if defined (__GNUC__) && !defined (__clang__) \ >> + && ((__GNUC__ >= 12 && __GNUC__ <= 15) \ >> + || (__GNUC__ == 16 && __GNUC_MINOR__ < 1)) >> +/* Work around PR gcc/110799 starting gcc 12, and assume it will be fixed in >> + the gcc 16.1 release. */ > > Should that not be gcc/120987? Thanks for noticing this. Fixed before pushing. > Also I notice the target milestone on > that gcc bug is set to 13.5, maybe that field is used differently for > gcc, but I was expecting to see 16.1 maybe? I know there's limits on > what we can do to ensure gcc fix this, but might as well get these > fields as correct as possible :) > > With the comment updated: > > Approved-By: Andrew Burgess > I've pushed this. After doing so, Richard Biener commented in the GCC PR ( https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120987#c25 ): ... It's usually better to place a noipa attribute on a select function where the issue shows up than disabling a whole pass which might lead to other latent bugs pop up here and there given test coverage with -fno-ipa-* or -fno-tree-* is very weak. ... But FWIW, I prefer disabling the pass on the basis that I don't want to run into the same problem again in a different form and place. Thanks, - Tom > Thanks, > Andrew > > >> +#pragma GCC optimize("-fno-ipa-modref") >> +#endif >> + >> #include >> >> #undef PACKAGE_NAME >> >> base-commit: 6ab3f09a682adcb4e841faf7fc19dea2671debed >> -- >> 2.43.0 >