diff options
author | Alan Modra <amodra@gmail.com> | 2019-12-10 19:04:37 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-12-11 11:36:59 +1030 |
commit | 9d48687b41f17ccbd7c61dd76b96147f28916951 (patch) | |
tree | c0ba2c8897739970b20cb4a40b06a6eacebdc738 /opcodes/aarch64-dis.c | |
parent | 76bba5ee850ea391ebdbb54dda5a06a567526dbf (diff) | |
download | gdb-9d48687b41f17ccbd7c61dd76b96147f28916951.zip gdb-9d48687b41f17ccbd7c61dd76b96147f28916951.tar.gz gdb-9d48687b41f17ccbd7c61dd76b96147f28916951.tar.bz2 |
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.
Diffstat (limited to 'opcodes/aarch64-dis.c')
-rw-r--r-- | opcodes/aarch64-dis.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/opcodes/aarch64-dis.c b/opcodes/aarch64-dis.c index 9300569..8b32097 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) |