From: Simon Marchi <simark@simark.ca>
To: Luis Machado <luis.machado@arm.com>,
Andrew Burgess <aburgess@redhat.com>,
gdb-patches@sourceware.org, pedro@palves.net
Cc: marcan@marcan.st
Subject: Re: [PATCH] aarch64: Check for valid inferior thread/regcache before reading pauth registers
Date: Fri, 17 Mar 2023 13:29:37 -0400 [thread overview]
Message-ID: <b38626aa-2a08-83ae-22f2-345f321525ee@simark.ca> (raw)
In-Reply-To: <ec4d0558-ea88-f765-1bab-edc774178a17@arm.com>
> What would be the outcome of this call when there is no active register cache because the inferior
> has been killed? I think it would assert in find_inferior_pid with a null_ptid.
>
> aarch64_remove_non_address_bits gets called for any memory access, so we may be in a state where we have
> a valid stopped thread, a valid running thread, core file, no inferiors (just reading symbols/bfd) and so
> on.
>
> Or were you considering doing a check for inferior_ptid == null_ptid before calling get_thread_regcache?
Yes, a check for inferior_ptid == null_ptid would make sense. I was
really just thinking about the initial problem, which is
aarch64_remove_non_address_bits being called while processing the event
in thread-db.
Simon
next prev parent reply other threads:[~2023-03-17 17:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-16 10:39 Luis Machado
2023-03-16 15:49 ` Andrew Burgess
2023-03-16 23:15 ` Luis Machado
2023-03-17 17:15 ` Simon Marchi
2023-03-17 17:25 ` Luis Machado
2023-03-17 17:29 ` Simon Marchi [this message]
2023-03-17 17:38 ` Luis Machado
2023-03-20 20:06 ` Andrew Burgess
2023-03-22 10:26 ` Luis Machado
2023-03-23 10:56 ` [PATCH, v2] " Luis Machado
2023-03-23 18:25 ` Kevin Buettner
2023-03-23 18:27 ` Luis Machado
2023-03-23 18:32 ` Luis Machado
2023-03-23 18:39 ` Kevin Buettner
2023-03-24 6:28 ` Luis Machado
2023-03-24 8:19 ` Luis Machado
2023-03-24 13:42 ` Luis Machado
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=b38626aa-2a08-83ae-22f2-345f321525ee@simark.ca \
--to=simark@simark.ca \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=luis.machado@arm.com \
--cc=marcan@marcan.st \
--cc=pedro@palves.net \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).