aarch64 disassembler infinite loop
authorAlan Modra <amodra@gmail.com>
Tue, 10 Dec 2019 08:34:37 +0000 (19:04 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 11 Dec 2019 01:06:59 +0000 (11:36 +1030)
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.

opcodes/ChangeLog
opcodes/aarch64-dis.c

index de76accd54238dcbb49b742f68273ba956af21f2..3460b3e2d605e7a8eceabe44afb4c4beecf046b5 100644 (file)
@@ -1,3 +1,9 @@
+2019-12-11  Alan Modra  <amodra@gmail.com>
+
+       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  <amodra@gmail.com>
 
        * epiphany-ibld.c: Regenerate.
index 930056981385987d0428eed2b3022cf65bdde6b7..8b32097a5fa116d728e7e70b15be11534740c843 100644 (file)
@@ -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)
This page took 0.02529 seconds and 4 git commands to generate.