From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id KOmpCBh+OGZh0AcAWB0awg (envelope-from ) for ; Mon, 06 May 2024 02:52:08 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=sD2t0Kc0; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=NRdDH15K; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=fOq/JMSw; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=XfcSn5uE; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 1A91A1E0C1; Mon, 6 May 2024 02:52:08 -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 F2FB11E030 for ; Mon, 6 May 2024 02:52:05 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 737C03858D38 for ; Mon, 6 May 2024 06:52:05 +0000 (GMT) Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) by sourceware.org (Postfix) with ESMTPS id 10ECD3858D28 for ; Mon, 6 May 2024 06:51:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 10ECD3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 10ECD3858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714978307; cv=none; b=SbPUTQ+vIZ3h38zie6J6cJbRbBE7bg+LFhySmxVRiP4cbNadZ4udS/xLIuhomtAKdXGFKLlXmpqQtIrUlpQu6yFgfh0t7rwPB1ezau/AJ5WQ6eDfXtmBLdiwcLhhqC1z2EQyk2WMtf1cz8AFQ8ITay8QU3yLqikcUyUyqeCNBSY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714978307; c=relaxed/simple; bh=FDHk5DtYtTJsVmWs+zUf33SraRA8kNTE/MwoApGBV2s=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:To:From; b=RxdTY0OnODcvLhghX2uPuDPXwxupF6JUFMwQpCzfiFyPIK+kVqn5Qfe3bvRSm3slkarib6foE2/5WTmDe+RJtvqtfmVS3J/fJxTS22c9/WBoCDEaWI1mXBluEm+qhGekCqmDOCTKwrvb80CXbKQ1DBHwWkDyN9+jE0nZcYCn4FE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 0F69037F4B; Mon, 6 May 2024 06:51:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1714978305; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=34CuEtfSlbTVpR2sBaEOEHOT6jZkDbTwQF9Npm2psWk=; b=sD2t0Kc0izZpDEGAML49nbWaO36zAOTbfqswUt7wsrN3f1R3GZCKU7bSNYGzXzdkTl7cGq w8ms+YBoTzb+WE6aV7yo5niQNleLRKLJ26Wfq0G+cbPMTFPFgazgonYu3UahG63Qm9NSFX cuhXsWn3ty8Vnz0PrZlKKWbwOmGJbUg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1714978305; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=34CuEtfSlbTVpR2sBaEOEHOT6jZkDbTwQF9Npm2psWk=; b=NRdDH15K2DC6SnEaX0VIMcOFkFGd/QvlUYy4hZSgdD0jL+sz6gqVDfHUF6+snVXP3LCwMB b8xVCRB88YkA5YCw== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b="fOq/JMSw"; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=XfcSn5uE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1714978304; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=34CuEtfSlbTVpR2sBaEOEHOT6jZkDbTwQF9Npm2psWk=; b=fOq/JMSwCQD196HM+tcCVwP5boVTxI+F4azLRxg8Vp9LoMX8Pp7PBFFqsf0h6qAlx/9rb4 hZ+fuk9Wa3f2jBRyaaOZB7fhOwgiUIZc8F1zWVQjul81BdAKLREV72/cJwzcLW2xO7LZd/ +D/Tt2eP9RznKSHrf777TvfqJ8LWTSE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1714978304; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=34CuEtfSlbTVpR2sBaEOEHOT6jZkDbTwQF9Npm2psWk=; b=XfcSn5uEtpTx3WbDDlLUPllo007821C3uob76rZr38YjoLzLC0AJB2iY5ndF3ZhKyB6IFo UMk5tJ+BqWCU5MCw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id DD2021386E; Mon, 6 May 2024 06:51:43 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id Ei9hNP99OGbeTQAAD6G6ig (envelope-from ); Mon, 06 May 2024 06:51:43 +0000 Message-ID: <959884bf-9cae-46c1-ba2e-4d62f3c77385@suse.de> Date: Mon, 6 May 2024 08:52:16 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] [gdb/exp] Fix cast handling for indirection To: Kevin Buettner , Pedro Alves Cc: gdb-patches@sourceware.org, Tom Tromey References: <20240502154902.22575-1-tdevries@suse.de> <20240502193145.5da7327d@f39-zbm-amd> <8734qyex0l.fsf@tromey.com> <51de396e-67fc-4451-a13e-091178d188f7@palves.net> <20240503103050.2ef46699@f39-zbm-amd> <1b81045d-5353-49cf-b80e-f64498dd3562@palves.net> <20240505175439.4a1c3317@f40-zbm-amd> Content-Language: en-US From: Tom de Vries In-Reply-To: <20240505175439.4a1c3317@f40-zbm-amd> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -4.12 X-Rspamd-Action: no action X-Rspamd-Queue-Id: 0F69037F4B X-Spam-Level: X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.12 / 50.00]; BAYES_HAM(-2.62)[98.31%]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; MX_GOOD(-0.01)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+] X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, 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 On 5/6/24 02:54, Kevin Buettner wrote: > On Sat, 4 May 2024 00:26:49 +0100 > Pedro Alves wrote: > >> I kind of emphasized the sign extension part above, but to be clear, with >> >> (gdb) p (long long)*a_loc() >> >> and gdb assuming that means a_loc returns "long long *", gdb incorrectly reads a >> 64-bit value off of the pointer address, which is totally bogus and would not >> be what gdb would do if it had debug info for a_loc(), in which case GDB would >> know that it returns char *, and thus would deref only one byte and behave like >> described above in the 1: 2: 3: steps. The behavior of the expression should not >> change like that depending on whether you have debug info. Thus, GDB should error >> out. > > This argument is compelling. You've convinced me. > And me as wel. I've submitted a patch (https://sourceware.org/pipermail/gdb-patches/2024-May/208843.html ) to redo the fix. Thanks, - Tom