From: Alan Modra Date: Tue, 10 Dec 2019 08:34:37 +0000 (+1030) Subject: aarch64 disassembler infinite loop X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9d48687b41f17ccbd7c61dd76b96147f28916951;p=binutils-gdb.git 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/ChangeLog b/opcodes/ChangeLog index de76accd542..3460b3e2d60 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,9 @@ +2019-12-11 Alan Modra + + PR 25270 + * aarch64-dis.c (aarch64_decode_variant_using_iclass): Return + false when field is zero for sve_size_tsz_bhs. + 2019-12-11 Alan Modra * epiphany-ibld.c: Regenerate. diff --git a/opcodes/aarch64-dis.c b/opcodes/aarch64-dis.c index 93005698138..8b32097a5fa 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)