From: Andrew Burgess <aburgess@redhat.com>
To: jaydeep.patil@imgtec.com, gdb-patches@sourceware.org
Cc: vapier@gentoo.org, joseph.faulls@imgtec.com,
bhushan.attarde@imgtec.com, jaydeep.patil@imgtec.com
Subject: Re: [PATCH v6 1/2] sim: riscv: Fix crash during instruction decoding
Date: Mon, 22 Jan 2024 10:18:03 +0000 [thread overview]
Message-ID: <878r4h659g.fsf@redhat.com> (raw)
In-Reply-To: <20240111052822.1576345-2-jaydeep.patil@imgtec.com>
<jaydeep.patil@imgtec.com> writes:
> From: Jaydeep Patil <jaydeep.patil@imgtec.com>
>
> The match_never() function has been removed and thus step_once() crashes
> during instruction decoding. Fixed it by checking for null pointer before
> invoking function attached to match_func member of riscv_opcode structure
> ---
> sim/riscv/sim-main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Thank you for continuing to work on these patches.
For patch 1/2:
Approved-By: Andrew Burgess <aburgess@redhat.com>
Thanks,
Andrew
>
> diff --git a/sim/riscv/sim-main.c b/sim/riscv/sim-main.c
> index b04d12c0de1..25dc9b41412 100644
> --- a/sim/riscv/sim-main.c
> +++ b/sim/riscv/sim-main.c
> @@ -1040,7 +1040,7 @@ void step_once (SIM_CPU *cpu)
> for (; op->name; op++)
> {
> /* Does the opcode match? */
> - if (! op->match_func (op, iw))
> + if (! op->match_func || ! op->match_func (op, iw))
> continue;
> /* Is this a pseudo-instruction and may we print it as such? */
> if (op->pinfo & INSN_ALIAS)
> --
> 2.25.1
next prev parent reply other threads:[~2024-01-22 10:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 5:28 [PATCH v6 0/2] sim: riscv: Compressed instruction simulation jaydeep.patil
2024-01-11 5:28 ` [PATCH v6 1/2] sim: riscv: Fix crash during instruction decoding jaydeep.patil
2024-01-22 10:18 ` Andrew Burgess [this message]
2024-01-23 1:18 ` Mike Frysinger
2024-01-11 5:28 ` [PATCH v6 2/2] sim: riscv: Add support for compressed integer instructions jaydeep.patil
2024-01-22 10:24 ` Andrew Burgess
2024-01-23 5:35 ` [EXTERNAL] " Jaydeep Patil
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=878r4h659g.fsf@redhat.com \
--to=aburgess@redhat.com \
--cc=bhushan.attarde@imgtec.com \
--cc=gdb-patches@sourceware.org \
--cc=jaydeep.patil@imgtec.com \
--cc=joseph.faulls@imgtec.com \
--cc=vapier@gentoo.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).