diff options
author | Alex Coplan <alex.coplan@arm.com> | 2020-07-02 13:53:07 +0100 |
---|---|---|
committer | Alex Coplan <alex.coplan@arm.com> | 2020-07-02 13:53:07 +0100 |
commit | f405494f214315091fb0864827b07b5e6f12ee84 (patch) | |
tree | bf96219255effe72b24ec8217213a71f1a26908e /gas/testsuite | |
parent | b1a35af2704842ff1a90626b0148c0fc93f995f6 (diff) | |
download | gdb-f405494f214315091fb0864827b07b5e6f12ee84.zip gdb-f405494f214315091fb0864827b07b5e6f12ee84.tar.gz gdb-f405494f214315091fb0864827b07b5e6f12ee84.tar.bz2 |
aarch64: Fix segfault on unicode symbols
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.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/gas/aarch64/reglike-label-unicode-segv.d | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/aarch64/reglike-label-unicode-segv.s | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gas/testsuite/gas/aarch64/reglike-label-unicode-segv.d b/gas/testsuite/gas/aarch64/reglike-label-unicode-segv.d new file mode 100644 index 0000000..f262e6f --- /dev/null +++ b/gas/testsuite/gas/aarch64/reglike-label-unicode-segv.d @@ -0,0 +1,8 @@ +#objdump: -dr + +.*: file format .* + +Disassembly of section \.text: + +0+ <x0é>: +.*: 00000000 udf #0 diff --git a/gas/testsuite/gas/aarch64/reglike-label-unicode-segv.s b/gas/testsuite/gas/aarch64/reglike-label-unicode-segv.s new file mode 100644 index 0000000..18f1e92 --- /dev/null +++ b/gas/testsuite/gas/aarch64/reglike-label-unicode-segv.s @@ -0,0 +1,2 @@ +x0é: +udf x0é |