From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id BU7QMHp+smV6pgcAWB0awg (envelope-from ) for ; Thu, 25 Jan 2024 10:30:02 -0500 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=C+8dnum1; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=iia9PjOG; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=C+8dnum1; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=iia9PjOG; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id BB1D81E0C3; Thu, 25 Jan 2024 10:30:02 -0500 (EST) 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 A1AA21E092 for ; Thu, 25 Jan 2024 10:30:00 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2503A385DC03 for ; Thu, 25 Jan 2024 15:30:00 +0000 (GMT) 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 4A7D0385841F for ; Thu, 25 Jan 2024 15:29:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4A7D0385841F 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 4A7D0385841F 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=1706196578; cv=none; b=ARnghIOpGjnvsUWN/kV3OLvKrRxWCK3LZaZ2LdyC6Hwh/sy9+t78tSUZWVXNSf28nvX4fBOyovXPMjQckyfvDhvTYqmwl6oIIJaU7GMQ9f2h23OxjSaYzOOBls5yZUWfUFcdT1/+7b3Nf4kJ4ZTOoCVV0cPyELfsFY/qC7cca1I= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706196578; c=relaxed/simple; bh=PWUOAyZNEl2Kyvw9iio9o19jbcpljIRu9f6TAQh6mo0=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:To:From; b=W8BwzEEmDaip6dWvpi+B8e0w8wz8W665KFFthHxaBRy2dABD2hxpcUnyyt6/BVrV8wTz9TXHQqqVIyXN1DC4q6z022kStFUVG/LZHXh3YFuzSmE9dYdOL37HxVbsKnPd23T3fJXrEL0LluinpiWSTu8lNCh/bgwgdUPcuyNMUPk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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 470532236D; Thu, 25 Jan 2024 15:29:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1706196575; 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=SemkVCTIBNpkxQe2rQHnNKCkXH8JmX2Y+epqWc2IGpc=; b=C+8dnum1E/r/YJ7JSpDalWZnC2cPnGqDC/07K+O57MCVOK2HYTIGny/R5H6vAK/js8r/lQ UNxUrS5t98/afZSuOuj6vP3mXphm12Cg5KX4ziWQKkUDXHImhEqyjxc8269DGJaO+x1AZp hKf+gULxnr3GfQrVktNHGpJUVhGy+DQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1706196575; 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=SemkVCTIBNpkxQe2rQHnNKCkXH8JmX2Y+epqWc2IGpc=; b=iia9PjOGg4cYIXrHIF1TEQSRapF4coT3NYvXjfSK61Uqm70xyhKVrLzvtZfFsPjTDyzKjo FJsgEZYnN3ak6xAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1706196575; 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=SemkVCTIBNpkxQe2rQHnNKCkXH8JmX2Y+epqWc2IGpc=; b=C+8dnum1E/r/YJ7JSpDalWZnC2cPnGqDC/07K+O57MCVOK2HYTIGny/R5H6vAK/js8r/lQ UNxUrS5t98/afZSuOuj6vP3mXphm12Cg5KX4ziWQKkUDXHImhEqyjxc8269DGJaO+x1AZp hKf+gULxnr3GfQrVktNHGpJUVhGy+DQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1706196575; 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=SemkVCTIBNpkxQe2rQHnNKCkXH8JmX2Y+epqWc2IGpc=; b=iia9PjOGg4cYIXrHIF1TEQSRapF4coT3NYvXjfSK61Uqm70xyhKVrLzvtZfFsPjTDyzKjo FJsgEZYnN3ak6xAw== 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 31892134C3; Thu, 25 Jan 2024 15:29: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 6gzFCl9+smXYZwAAD6G6ig (envelope-from ); Thu, 25 Jan 2024 15:29:35 +0000 Message-ID: Date: Thu, 25 Jan 2024 16:30:51 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] [gdb/build] Workaround gcc PR113599 Content-Language: en-US To: Sam James Cc: gdb-patches@sourceware.org References: <20240125142107.8643-1-tdevries@suse.de> <87msstigal.fsf@gentoo.org> From: Tom de Vries In-Reply-To: <87msstigal.fsf@gentoo.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [-0.51 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; BAYES_HAM(-0.42)[78.16%]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Level: X-Spam-Score: -0.51 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: 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 1/25/24 16:27, Sam James wrote: > > Tom de Vries writes: > >> Since gcc commit d3f48f68227 ("c++: non-dependent .* operand folding >> [PR112427]"), with gdb we run into PR gcc/113599 [1], a wrong-code bug, as >> reported in PR build/31281. >> >> Work around this by flipping inherit order: >> ... >> -class thread_info : public refcounted_object, >> - public intrusive_list_node >> +class thread_info : public intrusive_list_node, >> + public refcounted_object >> ... >> >> An argument could be made that this isn't necessary, because this occurred in >> an unreleased gcc version. >> >> However, I think it could be useful when bisecting gcc for other problems in >> building gdb. Having this workaround means the bisect won't reintroduce the >> problem. Furthermore, the workaround is harmless. >> >> Tested on Fedora rawhide x86_64. >> >> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31281 >> >> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113599 >> --- >> gdb/gdbthread.h | 7 ++++--- >> 1 file changed, 4 insertions(+), 3 deletions(-) >> >> diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h >> index e7035d40ad4..1d9730fd1fa 100644 >> --- a/gdb/gdbthread.h >> +++ b/gdb/gdbthread.h >> @@ -244,10 +244,11 @@ using private_thread_info_up = std::unique_ptr; >> strong reference, and is thus not accounted for in the thread's >> refcount. >> >> - The intrusive_list_node base links threads in a per-inferior list. */ >> + The intrusive_list_node base links threads in a per-inferior list. >> + We place it first in the inherit orer to work around PR gcc/113599. */ > > order > Thanks for catching that, fixed. - Tom >> >> -class thread_info : public refcounted_object, >> - public intrusive_list_node >> +class thread_info : public intrusive_list_node, >> + public refcounted_object >> { >> public: >> explicit thread_info (inferior *inf, ptid_t ptid); >> >> base-commit: 726f209eb1b05842d816eac8b0b8f9c7f6cd9fbc >