From 0970a68bcb9165aca8512ecd9ee9c0077abb9468 Mon Sep 17 00:00:00 2001 From: zinc Date: Thu, 15 Oct 2026 02:40:12 +0330 Subject: compiler: a //:lines marker starts a new file, so unbounded; and unchecked; of the source before it end there: a program joined to the unbounded runtime in a self-hosted run-only image is bounds-checked again (since d55b5fd its index errors went unreported); runtime_image_test expects the trap's exit status 2; spec 4.15.1, 4.x unchecked, 5.15.3 --- src/compiler/base.zc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/compiler/base.zc b/src/compiler/base.zc index 88708f0..99ee10f 100644 --- a/src/compiler/base.zc +++ b/src/compiler/base.zc @@ -1321,11 +1321,13 @@ int lt_end(int b, int end) { return 0; } // at the top level, a marker that comes before the item takes effect: lines are on, in its file. +// a marker starts a new file, so the file switches of the one before it (unbounded; and +// unchecked; in run.zc or rt.zc) end there: a program joined to the runtime is checked. int lt_apply_marks() { if (incdepth || ginst) return 0; while (lt_next_mark < lt_nmarks && lt_marks[lt_next_mark * 2] < tline) { lt_mark_base = lt_marks[lt_next_mark * 2]; lt_mark_file = lt_marks[lt_next_mark * 2 + 1]; - lines_on = 1; lt_next_mark++; + lines_on = 1; lt_next_mark++; bound_on = 1; check_on = 1; } return 0; } -- cgit v1.2.3