From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id EZH/GIWh22qhlRAAWB0awg (envelope-from ) for ; Fri, 23 Oct 2026 14:03:49 -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=nDvHxNg3; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 61EFB378002; Fri, 23 Oct 2026 14:03:49 -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 D9F001E007 for ; Fri, 23 Oct 2026 14:03:48 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7601A4BA23CC for ; Fri, 23 Oct 2026 18:03:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7601A4BA23CC 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=nDvHxNg3 Received: from omta36.uswest2.a.cloudfilter.net (omta36.uswest2.a.cloudfilter.net [35.89.44.35]) by sourceware.org (Postfix) with ESMTPS id 5F8AE4BA2E1E for ; Fri, 23 Oct 2026 18:03:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5F8AE4BA2E1E 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 5F8AE4BA2E1E Authentication-Results: sourceware.org; arc=none smtp.remote-ip=35.89.44.35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1792778603; cv=none; b=d4fXqB+bcKgOwIi3RGUeli3yqvH7eZ0wnbRCx7JHMyNr+GdO+QHJUpT441ZD3sPCFnWTCIVUydGbs2Ksy71kRvwMTFBR/MREz3erP1scM7DcR0ebl72x10c48tH/tevg6aBzD22mQ5tTmeX4fA/nUrecnwElyyfOMXmBFZppahQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1792778603; c=relaxed/simple; bh=vzCB9ox0smMrcxrhGxkQXRu+9tj0dgPk8Mf7kLnCnB0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Nky/XIXFhtrZ0PILjLXkbQ01tZHXSIEO6EYXYgkoOorHrNY0o3T+V8CugdSalF6ZjbYMBZ5l8M+sXbFtlC5nJXzeLw9KfenKi5LcSAkpKCbXFQyKgMk9ajRli/HkhsoIH1/DYeKsmVy87zvbGCclP2bCMtcyWBvPkbGGvRn+Z+M= 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=nDvHxNg3 reason="signing key too small" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F8AE4BA2E1E Received: from eig-obgw-6007b.ext.cloudfilter.net ([10.0.30.166]) by cmsmtp with ESMTPS id KIa3xYWd3usRSKJbuxZ44k; Fri, 23 Oct 2026 18:03:22 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id KJbsx0J9eQHK8KJbsxE7Bm; Fri, 23 Oct 2026 18:03:20 +0000 X-Authority-Analysis: v=2.4 cv=E73Npbdl c=1 sm=1 tr=0 ts=6adba169 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=660iZSQnnn4A:10 a=ItBw4LHWJt0A:10 a=pGLkceISAAAA:8 a=zstS-IiYAAAA:8 a=HAvCctXW38ZOCOFCbsoA:9 a=zZCYzV9kfG8A:10 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-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=DFdHrkZnD4euHP78YJR8lxGkOzrd/QfYq5kXq+ZNa1M=; b=nDvHxNg3jK//MrulTzI2UfoJGw 8F6EWzxfjCSjRIoZLQgh6duG3cF1/AUAwEMQCBvJoQ5fHRatKr9I47yrr45EFuGrZTo++LNMHjSGZ fWwGdsyNb1zKTBqAHKB02r62q; Received: from 97-122-110-129.hlrn.qwest.net ([97.122.110.129]:33554 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.100.1) (envelope-from ) id 1xKJbr-000000032tu-2uYl; Fri, 23 Oct 2026 12:03:19 -0600 From: Tom Tromey To: Jielun Wu Cc: gdb-patches@sourceware.org, simark@simark.ca Subject: Re: [PATCH v2] gdb: Check DW_OP_deref_type size against type In-Reply-To: <20260822035621.694548-1-firmiana402@gmail.com> (Jielun Wu's message of "Sat, 22 Aug 2026 11:56:21 +0800") References: <20260822035621.694548-1-firmiana402@gmail.com> X-Attribution: Tom Date: Fri, 23 Oct 2026 12:03:18 -0600 Message-ID: <87pkx0qopl.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: 1xKJbr-000000032tu-2uYl X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-110-129.hlrn.qwest.net (bapiya) [97.122.110.129]:33554 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: MS4xfJCMY3qu8DzhKTm6gQTH+MktzgfG/bJKXqda6KTNEsIRgILkWm97nG3kxtVGvgy33bhezu8thYcrUNrH3gYkFCqzJHn2rsaNRBMiphNaKjgfEOwRdlj0 p/0W6n8jG5HNUYEXWke5ah/jsXKs/iDBmU6v7Y8uSugptk8mNXBF2eUmEn13V5N5ipE0Kq90n0HsunCQlYKQXwqtvwOf3DdkNkA= 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 >>>>> Jielun Wu writes: > DWARF v5 requires the explicit size operand of DW_OP_deref_type to > match the size of the referenced base type. The evaluator currently > passes both sizes to dwarf_expr_context::deref without validating the > encoding, and the generic dereference helper accepts the mismatch by > zero-extending the bytes read from memory. > Reject a mismatch after resolving the base type. Name the actual opcode > and report both sizes in the diagnostic. > Teach the testsuite's DWARF assembler to emit DW_OP_deref_type and > DW_OP_GNU_deref_type operands. Add tests covering matching and > mismatched sizes for both opcodes. > Tested on x86_64-linux. Thank you for the patch. This looks good to me. If you want to get write-after-access to land this and future patches, please email me and I will get you set up. Otherwise let me know and I can check it in. Approved-By: Tom Tromey Tom