From d55b5fdf92a674a6495878f97a09e95bafdcba3f Mon Sep 17 00:00:00 2001 From: zinc Date: Wed, 14 Oct 2026 15:58:58 +0330 Subject: bounds checking: port agent/bounds-checking onto main 0879d0a; unbounded main in o3call, o3 tests expect no check, boundsrules, bounds_fixed, bounds_heap and zc0unbounded tests --- tests/programs/o3_bounds.zc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/programs/o3_bounds.zc') diff --git a/tests/programs/o3_bounds.zc b/tests/programs/o3_bounds.zc index eaf92eb..cd65548 100644 --- a/tests/programs/o3_bounds.zc +++ b/tests/programs/o3_bounds.zc @@ -1,5 +1,6 @@ namespace; include rt; -// an index outside a T[?] inside o3 code: caught by the inline check +// an index outside a T[?] inside o3 code: o3 implies unbounded, so nothing checks it +// (the write lands in the slack of the buddy block) and the program ends normally fn main() { int[?] a = rt.new(int[?], 5); o3 { int i = 7; a[i] = 1; } rt.free(d*a); return 0; } -- cgit v1.2.3