aboutsummaryrefslogtreecommitdiff
path: root/tests/programs/quarantine.zc
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-14 19:36:30 +0330
committerGravatar zinc <zinc@downsta.ir> 2026-10-14 19:36:30 +0330
commit7e9abb014169b77cba5174ae92ddc3d1eca4d667 (patch)
treeb7a9b0dd17c1c9fea7b94f9ba7ad115bf2f7470b /tests/programs/quarantine.zc
parentmerge work/bench: make bench, bench-check, bench-selftest; baseline at 89f35bd (diff)
parentrt: exact-size heap bounds; n, the words new asked for, lives in bits 32..62 ... (diff)
merge work/exactsize: exact-size heap bounds
Diffstat (limited to 'tests/programs/quarantine.zc')
-rw-r--r--tests/programs/quarantine.zc6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/programs/quarantine.zc b/tests/programs/quarantine.zc
index 061c4da..5697400 100644
--- a/tests/programs/quarantine.zc
+++ b/tests/programs/quarantine.zc
@@ -3,8 +3,10 @@ include rt;
// free quarantines the block. a stale alias still reads it, and freeing
// through the alias does nothing because the header already says free.
-// unchecked so the analyzer doesn't reject the use after free.
-unchecked fn main() {
+// unchecked so the analyzer doesn't reject the use after free, and unbounded
+// because a freed block has length 0 (a checked stale index traps, see
+// tests/conformance/8-runtime/stale_index_after_free_traps.zc).
+unchecked unbounded fn main() {
let p = rt.new(4), q, r, i = 0, t, bad = 0;
p[0] = 111; p[1] = 222; p[2] = 333; p[3] = 444;
q = p;