aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-07-19 08:05:30 +0200
committerTristan Gingold <tgingold@free.fr>2017-07-19 08:05:30 +0200
commit804a4093182a4bdbc30abfd3081a3f58c3bd2329 (patch)
treecf2e69e801baba7bb4afe3e5c086dcc81decfd3c /gas/testsuite
parent801f648cfc26f588aee8fc37ddc4ac959f331bd0 (diff)
downloadgdb-804a4093182a4bdbc30abfd3081a3f58c3bd2329.zip
gdb-804a4093182a4bdbc30abfd3081a3f58c3bd2329.tar.gz
gdb-804a4093182a4bdbc30abfd3081a3f58c3bd2329.tar.bz2
Fix gas crash on missing seh_endproc.
gas/ * testsuite/gas/pe/seh-x64-err-2.s: New test. * testsuite/gas/pe/seh-x64-err-2.l: New stderr output. * testsuite/gas/pe/pe.exp: Add test. * config/obj-coff-seh.c (obj_coff_seh_do_final): Don't try to end seh part.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/pe/pe.exp1
-rw-r--r--gas/testsuite/gas/pe/seh-x64-err-2.l3
-rw-r--r--gas/testsuite/gas/pe/seh-x64-err-2.s9
3 files changed, 13 insertions, 0 deletions
diff --git a/gas/testsuite/gas/pe/pe.exp b/gas/testsuite/gas/pe/pe.exp
index 9293b85..8a6c0d9 100644
--- a/gas/testsuite/gas/pe/pe.exp
+++ b/gas/testsuite/gas/pe/pe.exp
@@ -43,6 +43,7 @@ run_dump_test "set"
# These tests are only for x86_64 targets
if ([istarget "x86_64-*-mingw*"]) then {
run_list_test "seh-x64-err-1" ""
+ run_list_test "seh-x64-err-2" ""
run_dump_test "peseh-x64"
run_dump_test "peseh-x64-2"
run_dump_test "peseh-x64-3"
diff --git a/gas/testsuite/gas/pe/seh-x64-err-2.l b/gas/testsuite/gas/pe/seh-x64-err-2.l
new file mode 100644
index 0000000..48019ec
--- /dev/null
+++ b/gas/testsuite/gas/pe/seh-x64-err-2.l
@@ -0,0 +1,3 @@
+.*: Assembler messages:
+
+.*: Error: open SEH entry at end of file \(missing .seh_endproc\)
diff --git a/gas/testsuite/gas/pe/seh-x64-err-2.s b/gas/testsuite/gas/pe/seh-x64-err-2.s
new file mode 100644
index 0000000..2feff04
--- /dev/null
+++ b/gas/testsuite/gas/pe/seh-x64-err-2.s
@@ -0,0 +1,9 @@
+ .file "t2.c"
+ .text
+
+# missing endproc
+ .seh_proc test_missing_endproc
+test_missing_endproc:
+ .seh_setframe %rbp, 0
+ .seh_endprologue
+ ret