* AArch64: New Gas testsuite failure
@ 2021-12-03 9:58 Nick Clifton
2021-12-03 11:59 ` Richard Sandiford
0 siblings, 1 reply; 2+ messages in thread
From: Nick Clifton @ 2021-12-03 9:58 UTC (permalink / raw)
To: Richard Sandiford; +Cc: Binutils
Hi Richard,
I am seeing a new gas testsuite failure:
FAIL: gas/aarch64/mops_invalid_2
The log shows:
Executing on host: sh -c {/home/nickc/work/builds/binutils/current/aarch64-linux-gnu/gas/testsuite/../../binutils/objdump -dr -M notes tmpdir/mops_invalid_2.o >
tmpdir/dump.out 2>dump.tmp} /dev/null (timeout = 300)
spawn [open ...]
exited abnormally with 1, output:objdump: /work/sources/binutils/current/opcodes/aarch64-dis.c:3389: print_verifier_notes: Assertion `detail->error' failed.
Could you take a look please ?
Cheers
Nick
.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: AArch64: New Gas testsuite failure
2021-12-03 9:58 AArch64: New Gas testsuite failure Nick Clifton
@ 2021-12-03 11:59 ` Richard Sandiford
0 siblings, 0 replies; 2+ messages in thread
From: Richard Sandiford @ 2021-12-03 11:59 UTC (permalink / raw)
To: Nick Clifton; +Cc: Binutils
Nick Clifton <nickc@redhat.com> writes:
> Hi Richard,
>
> I am seeing a new gas testsuite failure:
>
> FAIL: gas/aarch64/mops_invalid_2
>
> The log shows:
>
> Executing on host: sh -c {/home/nickc/work/builds/binutils/current/aarch64-linux-gnu/gas/testsuite/../../binutils/objdump -dr -M notes tmpdir/mops_invalid_2.o >
> tmpdir/dump.out 2>dump.tmp} /dev/null (timeout = 300)
> spawn [open ...]
>
> exited abnormally with 1, output:objdump: /work/sources/binutils/current/opcodes/aarch64-dis.c:3389: print_verifier_notes: Assertion `detail->error' failed.
>
> Could you take a look please ?
Gah. Thanks for the heads up. The test was passing for me locally,
but running under valgrind shows that there's uninitialised memory.
I've pushed the below as (hopefully) obvious after testing on
aarch64-linux-gnu.
Thanks,
Richard
AARCH64_OPDE_EXPECTED_A_AFTER_B and AARCH64_OPDE_A_SHOULD_FOLLOW_B
are not paired with an error string, but we had an assert that the
error was nonnull. Previously this assert was testing uninitialised
memory and so could pass or fail arbitrarily.
opcodes/
* aarch64-opc.c (verify_mops_pme_sequence): Initialize the error
field to null for AARCH64_OPDE_EXPECTED_A_AFTER_B and
AARCH64_OPDE_A_SHOULD_FOLLOW_B.
* aarch64-dis.c (print_verifier_notes): Move assert.
---
opcodes/aarch64-dis.c | 2 +-
opcodes/aarch64-opc.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/opcodes/aarch64-dis.c b/opcodes/aarch64-dis.c
index fdb87b4526f..c0fb83122af 100644
--- a/opcodes/aarch64-dis.c
+++ b/opcodes/aarch64-dis.c
@@ -3386,7 +3386,6 @@ print_verifier_notes (aarch64_operand_error *detail,
/* The output of the verifier cannot be a fatal error, otherwise the assembly
would not have succeeded. We can safely ignore these. */
assert (detail->non_fatal);
- assert (detail->error);
(*info->fprintf_func) (info->stream, " // note: ");
switch (detail->kind)
@@ -3405,6 +3404,7 @@ print_verifier_notes (aarch64_operand_error *detail,
break;
default:
+ assert (detail->error);
(*info->fprintf_func) (info->stream, "%s", detail->error);
if (detail->index >= 0)
(*info->fprintf_func) (info->stream, " at operand %d",
diff --git a/opcodes/aarch64-opc.c b/opcodes/aarch64-opc.c
index 49dfe98769a..7aa37a5f0ab 100644
--- a/opcodes/aarch64-opc.c
+++ b/opcodes/aarch64-opc.c
@@ -5522,6 +5522,7 @@ verify_mops_pme_sequence (const struct aarch64_inst *inst,
&& prev_insn->opcode != opcode - 1)
{
mismatch_detail->kind = AARCH64_OPDE_EXPECTED_A_AFTER_B;
+ mismatch_detail->error = NULL;
mismatch_detail->index = -1;
mismatch_detail->data[0].s = prev_insn->opcode[1].name;
mismatch_detail->data[1].s = prev_insn->opcode->name;
@@ -5534,6 +5535,7 @@ verify_mops_pme_sequence (const struct aarch64_inst *inst,
if (is_new_section || !prev_insn || prev_insn->opcode != opcode - 1)
{
mismatch_detail->kind = AARCH64_OPDE_A_SHOULD_FOLLOW_B;
+ mismatch_detail->error = NULL;
mismatch_detail->index = -1;
mismatch_detail->data[0].s = opcode->name;
mismatch_detail->data[1].s = opcode[-1].name;
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-03 11:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-03 9:58 AArch64: New Gas testsuite failure Nick Clifton
2021-12-03 11:59 ` Richard Sandiford
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).