From: Nick Clifton Date: Tue, 9 Feb 2021 10:51:40 +0000 (+0000) Subject: Add a test for PR 27355 - where corrupt assembler .file directives could trigger... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=52563b0f1c5516930b4507861d261529483a5e83;p=binutils-gdb.git 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. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index ed343afd2d8..b4088cf0110 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,11 @@ +2021-02-09 Nick Clifton + + 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 * config/tc-tic54x (tic54x_mmregs): Rename to ... diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp index 4a695dfbaed..2917ea9fe5b 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 00000000000..5906669de43 --- /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 00000000000..6f5e2eae17f --- /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 00000000000..e7ddb349750 --- /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 +