From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id vvk2MBxD1mrx/zIAWB0awg (envelope-from ) for ; Mon, 19 Oct 2026 12:19:40 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=C0PrIC67; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id A7EFD1E050; Mon, 19 Oct 2026 12:19:40 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.8 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_MED autolearn=ham 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 935B81E04E for ; Mon, 19 Oct 2026 12:19:39 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9E46A4BA2E25 for ; Mon, 19 Oct 2026 16:19:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9E46A4BA2E25 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=C0PrIC67 Received: from omta036.useast.a.cloudfilter.net (omta036.useast.a.cloudfilter.net [44.202.169.35]) by sourceware.org (Postfix) with ESMTPS id E63DE4BA2E06 for ; Mon, 19 Oct 2026 16:19:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E63DE4BA2E06 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E63DE4BA2E06 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=44.202.169.35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1792426753; cv=none; b=TXlKeMyIaWkZ+V85NEKXIW+YHVxyiklWQBf3MxWdO2GIpGAcP0yRcntIlBUiAfZYxwZtEG5MdxANLSLM7+Pg2LGuJRcamMNTE0qA3k4MhS9ITdW6oMPyJZz6GP+FUcKztbpemDyXXRXUqv3Rw1818gKlEihu4pgFImC+ohwo0WA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1792426753; c=relaxed/simple; bh=QfkAPOP2Zdw7VrsxK4VPQ7206oHmJ3MHbRfhleZ2/aQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=IB1eXKEA+U3vFPGRop6WFHvLAH+l1L+0swckBirQoXnYI/3gr1j5ummEGais2oELdpvO11Z69lxJ1OQW15bHjU99jdoC+9entRU+ICZdoexjWK1UEHCrh/u3JsxmZih93xd8ahl949RKEbJXOgsCANKhqSsDz6dmwJv+/ZJB2CY= ARC-Authentication-Results: i=1; sourceware.org; dkim=policy (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=C0PrIC67 reason="signing key too small" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E63DE4BA2E06 Received: from eig-obgw-6004b.ext.cloudfilter.net ([10.0.30.210]) by cmsmtp with ESMTPS id IoetxaKVELvgbIq4uxoaZF; Mon, 19 Oct 2026 16:19:12 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id Iq4txJ51XouFZIq4txSbLb; Mon, 19 Oct 2026 16:19:12 +0000 X-Authority-Analysis: v=2.4 cv=Zd4dNtVA c=1 sm=1 tr=0 ts=6ad64300 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=660iZSQnnn4A:10 a=ItBw4LHWJt0A:10 a=QyXUC8HyAAAA:8 a=Rm5dEtNlezOK3qwh5z4A:9 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=aKF5NRrsRVSr3/yvKhc7JmCFA8ub0RmoVENnjQD2QO4=; b=C0PrIC672k7qjM/kj2cM/CFD2s 5LmsmQSP3d3+/6YE/0WYre20ZA5LJ2nd8Oq4dA9kU8PKieg6bKHvLutOIZBJ58/xcdKRpBlmoSdRF Zi5rjJCyo2Iq5KT+n3O4QyKLC; Received: from 97-122-110-129.hlrn.qwest.net ([97.122.110.129]:43400 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.100.1) (envelope-from ) id 1xIq4t-000000036pQ-1HGS; Mon, 19 Oct 2026 10:19:11 -0600 From: Tom Tromey To: Stephan Rohr Cc: gdb-patches@sourceware.org, guinevere@redhat.com Subject: Re: [PATCH vv2 1/1] gdb: fix assert after register write failure In-Reply-To: <20261015141127.152846-2-stephan.rohr@intel.com> (Stephan Rohr's message of "Thu, 15 Oct 2026 14:11:27 +0000") References: <20261015141127.152846-1-stephan.rohr@intel.com> <20261015141127.152846-2-stephan.rohr@intel.com> X-Attribution: Tom Date: Mon, 19 Oct 2026 10:19:10 -0600 Message-ID: <87o6cp1x4x.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.110.129 X-Source-L: No X-Exim-ID: 1xIq4t-000000036pQ-1HGS X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-110-129.hlrn.qwest.net (bapiya) [97.122.110.129]:43400 X-Source-Auth: tom+tromey.com X-Email-Count: 8 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfIADX4bI8ngkReLAnOHU0goSFbJlsVFzAA7bNrYgP4sBoh7rMFpTT7TIhu8FvnjscE2Pxqb2ho/KTtGiyAUq/qEYh0XC+dAV2H81/5dd8JkjhCCxELMy 9ydHMqc6v5lPjjmbvjySvoWLMXmtpJhxxO2PggUybCnMFjagvNV/wpm2StZbEAFSlVom9XMbJ0Flx5V+U77mUj4k4JkdiQNK89M= 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 >>>>> "Stephan" == Stephan Rohr writes: Stephan> From: Eduard Sargsyan Stephan> GDB tries to invalidate register cache if write to register fails. In case Stephan> when write was requested to be done for a remote inferior and connection with Stephan> remote is dead (so write request will fail) GDB cleans register caches and as Stephan> result setting register status fails with segmentation fault, because internal Stephan> pointers are not valid anymore and the unique_ptr with register status is Stephan> null. Stephan> This change adds check if register status cache is still valid before trying to Stephan> modify (set status to UNKNOWN). I don't mind this patch but I do wonder about it a little. I couldn't find where m_register_status is reset. How does this part work? Like, what set this to 'nullptr'? And I wonder about the contract of this object. I understand wanting this particular spot to do this check. But there are many other things that access m_register_status. Do those need checks, in theory, to preserve some invariant? Or just invalidation? thanks, Tom