From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id SBmuHS+iFmXK/h8AWB0awg (envelope-from ) for ; Fri, 29 Sep 2023 06:08:47 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=eAOH4lj7; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 772331E0C3; Fri, 29 Sep 2023 06:08:47 -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 6C1CF1E028 for ; Fri, 29 Sep 2023 06:08:45 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 18AF9387542F for ; Fri, 29 Sep 2023 10:08:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 18AF9387542F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1695982125; bh=HCoYqIezFTO46WcZMx7h17RIcqL6PJ1q+8NwbTB1TPc=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=eAOH4lj7K2kGYXZxivK+/AYOODpTS4O++NbLhw+Vj3oUFEPVVBZxGEDPmWqxKyjYm VPnpI3sTx2D9JRuKV9wnOhyePC2zGCO+BUc/bgGfWgMQmOXmXJ9Jh/erZ3iRKwJrrR wLfHaladTlucDEk3Ki/NFKULffmYI9Wx3D4q5cJk= Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 8277E385840B for ; Fri, 29 Sep 2023 10:08:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8277E385840B Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id BF844218E9; Fri, 29 Sep 2023 10:08:26 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id AC1D31390A; Fri, 29 Sep 2023 10:08:26 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id jR3ZKBqiFmXDHQAAMHmgww (envelope-from ); Fri, 29 Sep 2023 10:08:26 +0000 Message-ID: Date: Fri, 29 Sep 2023 12:08:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] [gdb/tui] Fix segfault in tui_find_disassembly_address Content-Language: en-US To: Kevin Buettner , Tom de Vries via Gdb-patches References: <20230905150339.6452-1-tdevries@suse.de> <20230927091013.5b3a590d@f37-zws-nv> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, BODY_8BITS, 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: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 9/28/23 22:57, Tom de Vries wrote: > On 9/27/23 18:10, Kevin Buettner wrote: >> Hi Tom, >> >> On Tue,  5 Sep 2023 17:03:38 +0200 >> Tom de Vries via Gdb-patches wrote: >> >>> Fix the segfault by handling asm_lines.empty () results of >>> tui_disassemble in >>> tui_find_disassembly_address. >>> >>> I've written a unit test that exercises this scenario. >>> >>> Tested on x86_64-linux. >>> >>> PR tui/30823 >>> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30823 >> >> I don't know this area very well, but your explanation and patch look >> reasonable to me. >> >> Reviewed-by: Kevin Buettner > > Thanks for the review. > > I've committed this, but I now see there's a new warning: > ... > gdb/tui/tui-disasm.c: In function ‘CORE_ADDR > tui_find_disassembly_address(gdbarch*, CORE_ADDR, int)’: > gdb/tui/tui-disasm.c:293:7: warning: ‘last_addr’ may be used > uninitialized in this function [-Wmaybe-uninitialized] >        if (last_addr < pc) >        ^~ > ... > > I'll take a look. I've submitted a fix here ( https://sourceware.org/pipermail/gdb-patches/2023-September/202849.html ). Thanks, - Tom