This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
aarch64 disassembler infinite loop
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Wed, 11 Dec 2019 11:19:21 +1030
- Subject: aarch64 disassembler infinite loop
Assembling this to an object and trying to disassemble results in
objdump -d looping forever.
.inst 0x45205120
PR 25270
* aarch64-dis.c (aarch64_decode_variant_using_iclass): Return
false when field is zero for sve_size_tsz_bhs.
diff --git a/opcodes/aarch64-dis.c b/opcodes/aarch64-dis.c
index 9300569813..8b32097a5f 100644
--- a/opcodes/aarch64-dis.c
+++ b/opcodes/aarch64-dis.c
@@ -2843,6 +2843,8 @@ aarch64_decode_variant_using_iclass (aarch64_inst *inst)
case sve_size_tsz_bhs:
i = extract_fields (inst->value, 0, 2, FLD_SVE_sz, FLD_SVE_tszl_19);
+ if (i == 0)
+ return FALSE;
while (i != 1)
{
if (i & 1)
--
Alan Modra
Australia Development Lab, IBM