From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 6w/sBO4HiWqbFjUAWB0awg (envelope-from ) for ; Fri, 21 Aug 2026 22:22:38 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=k5kkS+NQ; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id F33881E09B; Fri, 21 Aug 2026 22:22:37 -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.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE, 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 31CD41E09B for ; Fri, 21 Aug 2026 22:22:37 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7F8114BB24CF for ; Sat, 22 Aug 2026 02:22:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7F8114BB24CF Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=k5kkS+NQ Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by sourceware.org (Postfix) with ESMTPS id D5AE64BB1C04 for ; Sat, 22 Aug 2026 02:22:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D5AE64BB1C04 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D5AE64BB1C04 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787365331; cv=none; b=Ul4B3W1B5UakLHIVzsW19lzB6a+9oCtQzy47JF2ma4aZ8d94iKvWSb1xwEEjYGAIrX+PDuT60p9gtSvBgPf+nS/tBM/eGQk7Kl6RQLUwkAyRLJxoWPes8a0NIe9vDQgw87UQhrTKtDEF2G+h/7bjeB0lxMVN0V/q/HFacFJDq3A= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787365331; c=relaxed/simple; bh=oSUT0M2wgcotAEmHA3XCzuffDUQdvyZSRLE2TRdP6sI=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=B7cUcwIg2e2Z9sk/SIMDMrijUO0j8hU7+JY8OY4f8TiqFDTnRFU2jxQKDki37vZWS85hLGfcn+L+NDBJdAzc6h8X+ZCJ05hZLInEILxUseyfpwxECbc5IsoRffP98yOQw+kh5QlGsn0uoliLFkHiR5cQXaOTqs92TU9MsWuoPd4= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=k5kkS+NQ DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D5AE64BB1C04 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-2cad68425a7so1853345ad.1 for ; Fri, 21 Aug 2026 19:22:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787365330; x=1787970130; darn=sourceware.org; h=in-reply-to:from:cc:references:to:content-language:subject :user-agent:mime-version:date:message-id:content-type:from:to:cc :subject:date:message-id:reply-to:content-type; bh=nvbjOcBYWib5lCprgwXAR4QjAdXn01fkzKQMMjZ7DeY=; b=k5kkS+NQNapeDnWHcEM+k3I44bK8xki+vDLxHV0EzztMS+MvLSMEMZieXn+C9ArQ8a Cwii58zUL1iXqsjqaY7ngzO1meGkOwpAQs5oJ7fsv19UF4EMWKmElFsvZtmEGdipeXnd cJ3eB+wjOHdjVeO3s3vi9hLOLx9ge7O3tWIwF8g/D1Ie5ELj/iXR+pjMmBI0W4KDjDsX iZDdIGmo8U/+OeN7IS6qy0Q5vGxL4/ui3d0hKlBcuVeNLcy5Ym2Qjp15wwLMiPquxpsd hp/2HbMPoocLYQ4FZXa+Y0bk+CbcoSsXeYdWP43GHmY5WSZzqtPItrTgEt/OkPN8DvlF hNJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787365330; x=1787970130; h=in-reply-to:from:cc:references:to:content-language:subject :user-agent:mime-version:date:message-id:content-type:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=nvbjOcBYWib5lCprgwXAR4QjAdXn01fkzKQMMjZ7DeY=; b=KK32M2lVLjlEO//Mcfr6UzyXYHayoAC0ZXP5Eg8RzE8myYbyhnfrKl9NfgAclhJqUI A9pTj20OUV35+t8zoGwLCAbhBPPNVlsyC++WePNqx8DNLRJvL3aFrvWp0z7+4qm6mowa CRh+kHoRt0yglDw7ze1zt6sLkqr9sPpFTm1j46VgJweD0bHkwGiolCiFr0GwqizUQyQv zsMNkAu9Z1rBsd98nk3keNtx8Va8gIpHmq+7mg/ouSzG9G00tH2gR/49Ye90KLQ3zx1J XneOV2GLrughYmiNaEL2Gn+u4pLB+4u+PcyQS6jO+Xkd98EsllkFsgHrBr4HvWGl+ANh qZFQ== X-Gm-Message-State: AFuF++nwBrxkgymzzJEhGx1LGynpXIs4X/IVbvANwh/2HA6E2OO2BknY QUMmOOxQ3WX/rYHpLJjnd78ojDjXWLs1R95x1WA5WGub4jlWNoZ/Vr4B9zaAJg== X-Gm-Gg: AR+sD10pPx71nhkOOEwJZOcgELRGuf6QmYH2Tvqq5yQh+DkujA2oJZSdPMbK/5RdUdB Djdy5KDlSrnUWGhgLESuZV0k6PlJmpUw55KNg+x4x7p46DGDkkS6Jn6mMJZlkIGLKwX0yCT4lFT PUSb6egMaDUlrNmUKrZJeSFNmv8xyWfsL7wpgyv32JXxcowWxZd+j7FklGBJqU4vQwBKvi2kR4Q qVoxMiP0g2I+KNeNsdy1wDaUGbx14aTkOmq6/MabXxsjcmtc8hKAB1Z3zXZydYWMM7br2U0RFBX 1R8xsmOztRTWk6BTguI474uY0DDXu7FWvoGSQiIZ+INh4KCZKmT2aqxo4noRD+dSPV+XJWKqSnK WzOiQOC7qtyuBNsc2pDf63T7AqD7qG5J8H/ulaG1CbjA190j/HeWc/a1SF1LlFQtO69ePuAE8Cx yXFBkTYuHKRhJuurHLWrZ/sXyynsawCLTg86yjgU/5JmgvN+5r9JRagOtghWK78qY= X-Received: by 2002:a17:903:291:b0:2c4:397:dd7a with SMTP id d9443c01a7336-2d64b189ed8mr95774095ad.4.1787365329632; Fri, 21 Aug 2026 19:22:09 -0700 (PDT) Received: from [172.31.0.1] ([188.253.12.30]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2d6768d9004sm884865ad.70.2026.08.21.19.22.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Aug 2026 19:22:09 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------vJ5PGBIfP1TKxMBKTgdQrpcc" Message-ID: Date: Sat, 22 Aug 2026 10:22:04 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gdb: Check DW_OP_deref_type size against type Content-Language: en-US To: Tom Tromey References: <20260814085303.2561156-1-firmiana402@gmail.com> <87pkzbnul3.fsf@tromey.com> Cc: gdb-patches@sourceware.org From: JIELUN WU In-Reply-To: <87pkzbnul3.fsf@tromey.com> 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 This is a multi-part message in MIME format. --------------vJ5PGBIfP1TKxMBKTgdQrpcc Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2026/8/22 3:26, Tom Tromey wrote: >>>>>> 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. Add a DWARF assembler >> test covering both DW_OP_deref_type and DW_OP_GNU_deref_type. >> Tested on x86_64-linux. > I think we're going to need copyright assignments in order to merge this > and the other patches. > > You can email 'assign@gnu.org' to get started. > > Tom Hi Tom, Thanks for checking. I believe my copyright assignment has already been completed and should be on file. I started the process in late June and received the final confirmation email in early August. Please let me know if it is not showing up in the records, or if you need any additional information from me. Best, Jielun --------------vJ5PGBIfP1TKxMBKTgdQrpcc Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit


On 2026/8/22 3:26, Tom Tromey wrote:
Jielun Wu <firmiana402@gmail.com> 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.  Add a DWARF assembler
test covering both DW_OP_deref_type and DW_OP_GNU_deref_type.

      
Tested on x86_64-linux.
I think we're going to need copyright assignments in order to merge this
and the other patches.

You can email 'assign@gnu.org' to get started.

Tom


Hi Tom,

Thanks for checking. I believe my copyright assignment has already been
completed and should be on file. I started the process in late June and
received the final confirmation email in early August.

Please let me know if it is not showing up in the records, or if you need
any additional information from me.

Best,
Jielun

--------------vJ5PGBIfP1TKxMBKTgdQrpcc--