From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id aP7dFUB5/mW/iRIAWB0awg (envelope-from ) for ; Sat, 23 Mar 2024 02:40:00 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=a65UMuTe; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 46B651E0C0; Sat, 23 Mar 2024 02:40:00 -0400 (EDT) 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 B524D1E030 for ; Sat, 23 Mar 2024 02:39:57 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 47222385842F for ; Sat, 23 Mar 2024 06:39:57 +0000 (GMT) Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 275B83858D1E for ; Sat, 23 Mar 2024 06:39:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 275B83858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 275B83858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711175981; cv=none; b=Kf73mhQTWEadMckPnaCxV26pHOzL9w1IdDWTMY5te26QUvR8V4dnv60pXn9HyTir6GY+q62sYYw/76eOGZecPss+K5pq8Dst7x2CxqLyJ5TWz7sskH3K1+l9VE8iiNibcmmFi/NcY35CUILmL/ZSEs2mSkFsxswK4qEZEPy5/wQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711175981; c=relaxed/simple; bh=TUyfflfdXrqg8AueFen7iD3EMs7jKNEW8o4fuHAHtgo=; h=DKIM-Signature:Date:Message-Id:From:To:Subject; b=NdmbBP7tz6u5bzxZlVbGh3a9/FwempCPOhoPnCNQrzm3+rtvufheLkvgPzR+jEoYASN2nM1/29Cw1XqZGJjf26Tsk6z6P+7nhsFUjLdCYKFXuZFk/FG2g6SKu3ZN/AtDLHjnWASr3xCGa7bzgO8vQLGHizt8kzV4Iz09ooUPbvk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rnv2Z-00033c-F2; Sat, 23 Mar 2024 02:39:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=c9DcSVrYmuEHX0yxRUpqjblqVQcIuQ6OMr/gn0x5RGs=; b=a65UMuTenJJ3 0jrByc7DTBSxly9/ij5dYDblg9ohQpfZVu01/OPVAA0egDfJDLDd0t2rPeSczkz7Xm9XYHC0MF8b6 YbeYKNAO2V5Gp1ZIO5Z7gBkhBCDjJ49POC+TzFm3XBV9YcJ75LaiRu249rEo4q8z0ZErWvPtq/t1U BTn/M0kNYnboyu+8XTlGptkb3YUVu/mTxK/x85/rIU+ps8ZxQsUwnMOMHalhRaEoiELeQMGhla9h8 0+x28GuCmOSMnt7DVpRZXGJjaFXy/7BLiwv0m4fSz8cb5qYxYhMuten4yx/zXoniPsnm+uPtlLFBh JCELHIV9bqute2+O0jakTw==; Date: Sat, 23 Mar 2024 08:39:36 +0200 Message-Id: <86wmptzc2f.fsf@gnu.org> From: Eli Zaretskii To: Pedro Alves Cc: gdb-patches@sourceware.org In-Reply-To: <20240322193030.1235342-1-pedro@palves.net> (message from Pedro Alves on Fri, 22 Mar 2024 19:30:30 +0000) Subject: Re: [PATCH] Fix windows_nat_target::fake_create_process ptid References: <20240322193030.1235342-1-pedro@palves.net> X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_PASS, SPF_PASS, TXREP 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 > From: Pedro Alves > Date: Fri, 22 Mar 2024 19:30:30 +0000 > > While working on Windows non-stop mode, I managed to introduce a bug > that led to fake_create_process being called. That then resulted in > GDB crashes later on, because fake_create_process added a thread with > an incorrect ptid for this target. It is putting dwThreadId in the > tid field of the ptid instead of on the lwp field. This is fixed by > this patch. > > I do however wonder why nobody has seen it this long. AFAIU, to actually see the bug, one would need to attach GDB to a process whose main thread has exited, is that true? If so, I'm not surprised this bug was not reported: it's unusual for the main thread to exit without shutting down the process, and the need to attach to such a process (as opposed to having it run from GDB to begin with) makes that even more rare. And finally, not every bug is reported by the first person who sees it the first time, right?