diff --git a/core/testing/signal_handler_windows.odin b/core/testing/signal_handler_windows.odin index 8843dde92..83f06a66b 100644 --- a/core/testing/signal_handler_windows.odin +++ b/core/testing/signal_handler_windows.odin @@ -134,7 +134,7 @@ This is a dire bug and should be reported to the Odin developers. } signal := local_test_expected_failures.signal switch signal { - case libc.SIGILL: passed = code == win32.EXCEPTION_ILLEGAL_INSTRUCTION + case libc.SIGILL: passed = code == win32.EXCEPTION_ILLEGAL_INSTRUCTION || code == win32.EXCEPTION_ARRAY_BOUNDS_EXCEEDED case libc.SIGSEGV: passed = code == win32.EXCEPTION_ACCESS_VIOLATION case libc.SIGFPE: switch code { diff --git a/tests/core/testing/test_core_testing.odin b/tests/core/testing/test_core_testing.odin index a323971dc..ed3a29173 100644 --- a/tests/core/testing/test_core_testing.odin +++ b/tests/core/testing/test_core_testing.odin @@ -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) +}