mirror of
https://github.com/odin-lang/Odin.git
synced 2026-05-24 20:59:52 +00:00
Add invalid array bound trap test
This commit is contained in:
@@ -50,3 +50,9 @@ test_expected_signal :: proc(t: ^testing.T) {
|
||||
testing.expect_signal(t, libc.SIGILL)
|
||||
libc.raise(libc.SIGILL)
|
||||
}
|
||||
|
||||
@test
|
||||
test_array_bounds_trap_signal :: proc(t: ^testing.T) {
|
||||
testing.expect_signal(t, libc.SIGILL)
|
||||
_ = make([]u8, -1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user