From 742cd5bc7747dce5958e2abd2c06683884c234e8 Mon Sep 17 00:00:00 2001 From: FourteenBrush <74827262+FourteenBrush@users.noreply.github.com> Date: Mon, 13 Apr 2026 14:43:08 +0200 Subject: [PATCH 1/2] Add `EXCEPTION_ARRAY_BOUNDS_EXCEEDED` to win32 testing.expect_signal handler --- core/testing/signal_handler_windows.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { From cce574cfc4e6e092707370fd1d48efd21f21a893 Mon Sep 17 00:00:00 2001 From: FourteenBrush <74827262+FourteenBrush@users.noreply.github.com> Date: Mon, 13 Apr 2026 14:51:51 +0200 Subject: [PATCH 2/2] Add invalid array bound trap test --- tests/core/testing/test_core_testing.odin | 6 ++++++ 1 file changed, 6 insertions(+) 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) +}