diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2023-03-20 09:59:16 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2023-03-21 09:13:23 -0700 |
commit | 100f993c53a50352fd91554927142a2558f3481c (patch) | |
tree | 22ec216c214c6f145d78f7a85e83bc5c1df2fb49 /gas/testsuite | |
parent | 70ea5a46bd926149fb4a9c3da32c2fc14f6e83c3 (diff) | |
download | gdb-100f993c53a50352fd91554927142a2558f3481c.zip gdb-100f993c53a50352fd91554927142a2558f3481c.tar.gz gdb-100f993c53a50352fd91554927142a2558f3481c.tar.bz2 |
x86: Check unbalanced braces in memory reference
Check unbalanced braces in memory reference to avoid assembler crash
caused by
commit e87fb6a6d0cdfc0e9c471b7825c20c238c2cf506
Author: Jan Beulich <jbeulich@suse.com>
Date: Wed Oct 5 09:16:24 2022 +0200
x86/gas: support quoted address scale factor in AT&T syntax
PR gas/30248
* config/tc-i386.c (i386_att_operand): Check unbalanced braces
in memory reference.
* testsuite/gas/i386/i386.exp: Run pr30248.
* testsuite/gas/i386/pr30248.d: New file.
* testsuite/gas/i386/pr30248.err: Likewise.
* testsuite/gas/i386/pr30248.s: Likewise.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/gas/i386/i386.exp | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/pr30248.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/pr30248.err | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/pr30248.s | 2 |
4 files changed, 10 insertions, 0 deletions
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index 590cd78..4d2150f 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -752,6 +752,7 @@ run_dump_test pr19498 run_list_test "nop-bad-1" "" run_list_test "unspec" "" run_dump_test "fp" +run_dump_test pr30248 if {[is_elf_format] || [istarget "*-*-vxworks*"]} then { run_list_test_stdin "list-1" "-al" run_list_test_stdin "list-2" "-al" diff --git a/gas/testsuite/gas/i386/pr30248.d b/gas/testsuite/gas/i386/pr30248.d new file mode 100644 index 0000000..a6efd26 --- /dev/null +++ b/gas/testsuite/gas/i386/pr30248.d @@ -0,0 +1,2 @@ +#as: +#error_output: pr30248.err diff --git a/gas/testsuite/gas/i386/pr30248.err b/gas/testsuite/gas/i386/pr30248.err new file mode 100644 index 0000000..1f71543 --- /dev/null +++ b/gas/testsuite/gas/i386/pr30248.err @@ -0,0 +1,5 @@ +#failif + +#... +.*Internal error.* +#pass diff --git a/gas/testsuite/gas/i386/pr30248.s b/gas/testsuite/gas/i386/pr30248.s new file mode 100644 index 0000000..ab87500 --- /dev/null +++ b/gas/testsuite/gas/i386/pr30248.s @@ -0,0 +1,2 @@ + .text + lgs ")""" |