Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
To: Kevin Buettner <kevinb@redhat.com>,
	Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 1/2] [gdb/tui] Fix segfault in tui_find_disassembly_address
Date: Fri, 29 Sep 2023 12:08:33 +0200	[thread overview]
Message-ID: <f0e99005-e224-4ff5-a381-a374d6d1064d@suse.de> (raw)
In-Reply-To: <ca7d1387-04d4-4df9-b49f-82145f14312f@suse.de>

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 <gdb-patches@sourceware.org> 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 <kevinb@redhat.com>
> 
> 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


      reply	other threads:[~2023-09-29 10:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-05 15:03 Tom de Vries via Gdb-patches
2023-09-05 15:03 ` [PATCH 2/2] [gdb/tui] Only handle code sections in tui_find_backward_disassembly_start_address Tom de Vries via Gdb-patches
2023-09-27 16:15   ` Kevin Buettner via Gdb-patches
2023-09-28 18:23     ` Tom de Vries via Gdb-patches
2023-09-26 15:22 ` [PING][PATCH 1/2] [gdb/tui] Fix segfault in tui_find_disassembly_address Tom de Vries via Gdb-patches
2023-09-27 16:10 ` [PATCH " Kevin Buettner via Gdb-patches
2023-09-28 20:57   ` Tom de Vries via Gdb-patches
2023-09-29 10:08     ` Tom de Vries via Gdb-patches [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f0e99005-e224-4ff5-a381-a374d6d1064d@suse.de \
    --to=gdb-patches@sourceware.org \
    --cc=kevinb@redhat.com \
    --cc=tdevries@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox