From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id MagfOBgKl2rlcxsAWB0awg (envelope-from ) for ; Tue, 01 Sep 2026 13:23:36 -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=V2DS65GW; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id C4B241E033; Tue, 01 Sep 2026 13:23:36 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,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 DA3D01E033 for ; Tue, 01 Sep 2026 13:23:35 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 986864BA2E35 for ; Tue, 1 Sep 2026 17:23:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 986864BA2E35 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=V2DS65GW Received: from omta38.uswest2.a.cloudfilter.net (omta38.uswest2.a.cloudfilter.net [35.89.44.37]) by sourceware.org (Postfix) with ESMTPS id C387D4BA2E36 for ; Tue, 1 Sep 2026 17:22:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C387D4BA2E36 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 C387D4BA2E36 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=35.89.44.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788283379; cv=none; b=jl8CXESUPG9PA9ydD/U+cteR6hqnVK0Q/A184Nj9pgsztBC8IcOn2LLI1AhpjrHxJUwDx/WhkIrg9fcNIBFmDLVjfApNwpgfDh0Wbe9vmcvFEmhlZuyvs4HbDE9dItuHN4tY32k5+ODnUDwHeBPQhoUalPXlYZLSpRLInG/U4A4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788283379; c=relaxed/simple; bh=NGeVM/gdcqRNibdC923HMzk0SwaP+AAp8xn4YYsuoLo=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=JKdn4IKTZbXlycekiB6/tDKib38ASUV9Ciq7VRmYgbPXqhcTkib3jbEdMYllzI39SiNWgIibVd/IsqxgOX6LOvYIDQIBGJBUqAxNMjxa0b5Bvl4TSTPhJ775sFfnDAG8UHxA4hAFOgCcjo7oJc/Aayau/tDWbqOxt4wSdN+16sA= 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=V2DS65GW reason="signing key too small" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C387D4BA2E36 Received: from eig-obgw-5001b.ext.cloudfilter.net ([10.0.29.181]) by cmsmtp with ESMTPS id 1QvLxACr4v0nd1SCHxzYzW; Tue, 01 Sep 2026 17:22:57 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 1SCGxELEAfDqY1SCGxrZ89; Tue, 01 Sep 2026 17:22:56 +0000 X-Authority-Analysis: v=2.4 cv=HKbDFptv c=1 sm=1 tr=0 ts=6a9709f0 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=VdqzKS8jKosA:10 a=ItBw4LHWJt0A:10 a=zstS-IiYAAAA:8 a=BHBy-HsaTQG1l_lzSWcA:9 a=4G6NA9xxw8l3yy4pmD5M:22 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-Subscribe: List-Post:List-Owner:List-Archive; bh=L1p7C0CSbDZ8roW9caW3zmLNP8sMQS3L7E1e3mLjXgU=; b=V2DS65GWhMmk9QPdQDCEHO3vgX 4s2g8DYD0cxs64D8klnQFOrV8Ji2T8Aj0mybV6qLzYXOuFVtoSR2zyyIjMuu4a2n6yS2XfAThmIVm eQLe9/dmfP39fkkCRhUkja26H; Received: from 97-122-117-2.hlrn.qwest.net ([97.122.117.2]:60792 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.99.5) (envelope-from ) id 1x1SCF-00000003kSI-3FzU; Tue, 01 Sep 2026 11:22:55 -0600 From: Tom Tromey To: Hannes Domani Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v3 2/8] Windows gdb: Use allocated buffer for CONTEXT In-Reply-To: <20260829145823.1034821-2-ssbssa@yahoo.de> (Hannes Domani's message of "Sat, 29 Aug 2026 16:48:59 +0200") References: <20260829145823.1034821-1-ssbssa@yahoo.de> <20260829145823.1034821-2-ssbssa@yahoo.de> X-Attribution: Tom Date: Tue, 01 Sep 2026 11:22:54 -0600 Message-ID: <87a4q07uoh.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.117.2 X-Source-L: No X-Exim-ID: 1x1SCF-00000003kSI-3FzU X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-117-2.hlrn.qwest.net (bapiya) [97.122.117.2]:60792 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfN6Rb/jS1y4sss0fKjKtyGkkeOYLNmlo4v5Yx3JFkU3SYj1J7eJEjbnL/BrLa6XCMRUy+XFJtOCbBj1PyYqFEqsRZjw7mS5UlY+3dBvQRsJQyvItxqQU glliHIR/Q7IyZVHr3JvJhbircUMfHtDcyk4byAh/mq2VBmbMe7GaD7lGC4x12lna9Zpvn8qramLkiuOKIP8YOIcSOpgch+yflnM= 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 >>>>> "Hannes" == Hannes Domani writes: Hannes> This is done in preparation for the XState functions, because the Hannes> extended registers are stored directly after the CONTEXT, and its actual Hannes> size depends on the available XState features. Looks good, thanks. I have one note but it's not really super important. Approved-By: Tom Tromey Hannes> +windows_thread_info::windows_thread_info (windows_process_info *proc_, Hannes> + DWORD tid_, HANDLE h_, CORE_ADDR tlb) Hannes> + : proc (proc_), Hannes> + tid (tid_), Hannes> + h (h_), Hannes> + thread_local_base (tlb) Hannes> +{ Hannes> +#ifdef __x86_64__ Hannes> + if (proc->wow64_process) Hannes> + { Hannes> + context_buffer.reset (xmalloc (sizeof (WOW64_CONTEXT))); Hannes> + wow64_context = (WOW64_CONTEXT *) context_buffer.get (); Hannes> + } Hannes> + else Hannes> +#endif Hannes> + { Hannes> + context_buffer.reset (xmalloc (sizeof (CONTEXT))); Hannes> + context = (CONTEXT *) context_buffer.get (); Hannes> + } Hannes> + *proc->context_flags_ptr (this) = 0; I guess this is because the memory isn't initialized? You could use XCNEW instead of xmalloc to fix this. Tom