From: Simon Marchi <simark@simark.ca>
To: Aaron Merey <amerey@redhat.com>,
gdb-patches@sourceware.org, cbiesinger@google.com
Subject: Re: [PATCH] gdb: Check for nullptr when computing srcpath
Date: Thu, 27 Feb 2020 23:37:00 -0000 [thread overview]
Message-ID: <f70b112e-b034-cc7e-4b3b-e066213091be@simark.ca> (raw)
In-Reply-To: <20200227221156.1248760-1-amerey@redhat.com>
On 2020-02-27 5:11 p.m., Aaron Merey wrote:
> On Thu, Feb 27, 2020 at 2:18 PM Simon Marchi <simark@simark.ca> wrote:
>> Please provide in the commit message an explanation of what this fixes, including
>> how to reproduce the crash. Â Since this fixes the execution of an existing test
>> case, you can include the "make check" command line used to run it, like:
>>
>> Â make check TESTS="gdb.dwarf2/dw2-ranges-base"
>
> Fixed.
>
>> Also, do you think you'd be able to send your patches using git-send-email? That makes
>> it much easier to read and comment on.
>
> Sure.
>
> On Thu, Feb 27, 2020 at 2:33 PM Christian Biesinger <cbiesinger@google.com> wrote:
>> + Â if (build_id != nullptr && srcpath.size () > 0)
>>
>> I usually prefer !srcpath.empty ()
>
> Fixed.
>
> Aaron
>
>
> From d048f84f027006782cd96dc66a10477ed5a78243 Mon Sep 17 00:00:00 2001
> From: Aaron Merey <amerey@redhat.com>
> Date: Thu, 27 Feb 2020 15:51:11 -0500
> Subject: [PATCH] gdb: Check for nullptr when computing srcpath
>
> This fixes a regression caused by commit 0d79cdc494d5:
>
> $ make check TESTS="gdb.dwarf2/dw2-ranges-base.exp"
> [...]
> ERROR: GDB process no longer exists
>
> This error is caused by an abort during the computation of srcpath
> when SYMTAB_DIRNAME (s) == NULL.
>
> Computing srcpath only when SYMTAB_DIRNAME (s) is not NULL fixes this
> error. Also change the condition for calling debuginfod_source_query
> to include whether srcpath could be computed.
>
> gdb/ChangeLog:
>
> 2020-02-27 Aaron Merey <amerey@redhat.com>
>
> * source.c (open_source_file): Check for nullptr when computing
> srcpath.
Thanks, that LGTM.
Simon
prev parent reply other threads:[~2020-02-27 23:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-27 18:00 Aaron Merey
2020-02-27 19:18 ` Simon Marchi
2020-02-27 19:20 ` Simon Marchi
2020-02-27 19:33 ` Christian Biesinger via gdb-patches
2020-02-27 22:12 ` Aaron Merey
2020-02-27 23:37 ` Simon Marchi [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=f70b112e-b034-cc7e-4b3b-e066213091be@simark.ca \
--to=simark@simark.ca \
--cc=amerey@redhat.com \
--cc=cbiesinger@google.com \
--cc=gdb-patches@sourceware.org \
/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