Add tests that trap, and fix handling of SIGFPE on x86.
This commit is contained in:
11
filetests/trap_divbyzero.wat
Normal file
11
filetests/trap_divbyzero.wat
Normal file
@@ -0,0 +1,11 @@
|
||||
(module
|
||||
(func $foo (result i32)
|
||||
i32.const 1
|
||||
i32.const 0
|
||||
i32.div_s
|
||||
)
|
||||
(func $main
|
||||
(drop (call $foo))
|
||||
)
|
||||
(start $main)
|
||||
)
|
||||
9
filetests/trap_stackoverflow.wat
Normal file
9
filetests/trap_stackoverflow.wat
Normal file
@@ -0,0 +1,9 @@
|
||||
(module
|
||||
(func $foo
|
||||
(call $main)
|
||||
)
|
||||
(func $main
|
||||
(call $foo)
|
||||
)
|
||||
(start $main)
|
||||
)
|
||||
9
filetests/trap_unreachable.wat
Normal file
9
filetests/trap_unreachable.wat
Normal file
@@ -0,0 +1,9 @@
|
||||
(module
|
||||
(func $foo
|
||||
(unreachable)
|
||||
)
|
||||
(func $main
|
||||
(call $foo)
|
||||
)
|
||||
(start $main)
|
||||
)
|
||||
Reference in New Issue
Block a user