diff options
author | Nick Clifton <nickc@redhat.com> | 2021-02-09 10:51:40 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2021-02-09 10:51:40 +0000 |
commit | 52563b0f1c5516930b4507861d261529483a5e83 (patch) | |
tree | 10d183e4bfb79cfc3520c4a062cc601bac7bc6c2 | |
parent | 32d5141c70cccebec0f2a506d9a821f579e90e81 (diff) | |
download | gdb-52563b0f1c5516930b4507861d261529483a5e83.zip gdb-52563b0f1c5516930b4507861d261529483a5e83.tar.gz gdb-52563b0f1c5516930b4507861d261529483a5e83.tar.bz2 |
Add a test for PR 27355 - where corrupt assembler .file directives could trigger a segmentation fault.
PR 27355
* testsuite/gas/elf/pr27355.s: New test source file.
* testsuite/gas/elf/pr27355.d: New test control file.
* testsuite/gas/elf/pr27355.err: Expected errors from new test.
* testsuite/gas/elf/elf.exp: Run the new test.
-rw-r--r-- | gas/ChangeLog | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/elf/elf.exp | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/elf/pr27355.d | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/elf/pr27355.err | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/elf/pr27355.s | 4 |
5 files changed, 21 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index ed343af..b4088cf 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,11 @@ +2021-02-09 Nick Clifton <nickc@redhat.com> + + PR 27355 + * testsuite/gas/elf/pr27355.s: New test source file. + * testsuite/gas/elf/pr27355.d: New test control file. + * testsuite/gas/elf/pr27355.err: Expected errors from new test. + * testsuite/gas/elf/elf.exp: Run the new test. + 2021-02-08 Mike Frysinger <vapier@gentoo.org> * config/tc-tic54x (tic54x_mmregs): Rename to ... diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp index 4a695df..2917ea9 100644 --- a/gas/testsuite/gas/elf/elf.exp +++ b/gas/testsuite/gas/elf/elf.exp @@ -304,6 +304,7 @@ if { [is_elf_format] } then { run_dump_test "bad-section-flag" run_dump_test "bad-size" run_dump_test "bad-group" + run_dump_test "pr27355" run_dump_test "syms" diff --git a/gas/testsuite/gas/elf/pr27355.d b/gas/testsuite/gas/elf/pr27355.d new file mode 100644 index 0000000..5906669 --- /dev/null +++ b/gas/testsuite/gas/elf/pr27355.d @@ -0,0 +1,3 @@ +#name: PR 27355 +#error_output: pr27355.err + diff --git a/gas/testsuite/gas/elf/pr27355.err b/gas/testsuite/gas/elf/pr27355.err new file mode 100644 index 0000000..6f5e2ea --- /dev/null +++ b/gas/testsuite/gas/elf/pr27355.err @@ -0,0 +1,5 @@ +.*pr27355.s: Assembler messages: +.*pr27355.s:1: Error: bad expression +.*pr27355.s:2: Error: bad or irreducible absolute expression +.*pr27355.s:3: Error: bad or irreducible absolute expression +.*pr27355.s:3: Error: missing string diff --git a/gas/testsuite/gas/elf/pr27355.s b/gas/testsuite/gas/elf/pr27355.s new file mode 100644 index 0000000..e7ddb34 --- /dev/null +++ b/gas/testsuite/gas/elf/pr27355.s @@ -0,0 +1,4 @@ + .file <"input_test.c" + .file .string "%d\n""input_test.c" + .file not reached + |