This patch fixes a segfault which occurs when the AArch64 backend parses
a symbol operand that begins with a register name and ends with a
unicode byte (byte value > 127).
For example, the following input causes the crash:
x0é: udf x0é
gas/ChangeLog:
2020-07-02 Alex Coplan <alex.coplan@arm.com>
* config/tc-aarch64.c (reg_name_p): Fix cast so that we don't
segfault on negative chars.
* testsuite/gas/aarch64/reglike-label-unicode-segv.d: New test.
* testsuite/gas/aarch64/reglike-label-unicode-segv.s: Input.
+2020-07-02 Alex Coplan <alex.coplan@arm.com>
+
+ * config/tc-aarch64.c (reg_name_p): Fix cast so that we don't
+ segfault on negative chars.
+ * testsuite/gas/aarch64/reglike-label-unicode-segv.d: New test.
+ * testsuite/gas/aarch64/reglike-label-unicode-segv.s: Input.
+
2020-07-02 Nick Clifton <nickc@redhat.com>
PR 26028
return FALSE;
skip_whitespace (str);
- if (*str == ',' || is_end_of_line[(unsigned int) *str])
+ if (*str == ',' || is_end_of_line[(unsigned char) *str])
return TRUE;
return FALSE;
--- /dev/null
+#objdump: -dr
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+0+ <x0é>:
+.*: 00000000 udf #0
--- /dev/null
+x0é:
+udf x0é