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.
/* 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)
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",
&& 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;
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;