ubsan: arm: out of bounds array access
Alan Modra
amodra@gmail.com
Mon Jan 20 09:50:00 GMT 2020
.inst 0x81bdfe9f
disassembles as
0: 81bdfe9f ldaexdhi pc, reg-names-std, [sp]
I'm quite sure "reg-names-std" isn't an ARM register. Yes, I know
wrapping the 'T' value results in something that won't assemble..
* arm-dis.c (print_insn_arm): Wrap 'T' value.
diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c
index c986b5897e..be2a93253b 100644
--- a/opcodes/arm-dis.c
+++ b/opcodes/arm-dis.c
@@ -10106,7 +10106,7 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info, long given)
case 'T':
/* We want register + 1 when decoding T. */
if (*c == 'T')
- ++value;
+ value = (value + 1) & 0xf;
if (c[1] == 'u')
{
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list