diff --git a/.crumb b/.crumb index 9842a113..6e1ddda9 100644 --- a/.crumb +++ b/.crumb @@ -33,14 +33,14 @@ "purpose": "Directory docs. Purpose not yet described by a human." }, { - "digest": "ec2b543af27bd4f66e49c7e10e64ddc54057ef6cd52328c0ddd7eb0e8c83992f", - "last_commit": "a7606b17", + "digest": "5dacfd6f5a49e0687495a865be062de18cf3500ee32f028ef3dba95580caa25a", + "last_commit": "8e84876f", "name": "native", "purpose": "Directory native. Purpose not yet described by a human." }, { "digest": "e9c74468508c5cdba0156bfd9c4cf77b3297cdfdc96f437b7d4d3cd3db2dc7b4", - "last_commit": "a7606b17", + "last_commit": "de58b078", "name": "scripts", "purpose": "Directory scripts. Purpose not yet described by a human." }, @@ -51,15 +51,15 @@ "purpose": "First-party host artifact preparation tools" } ], - "children_root": "sha256:c3e230a0fb7011e2e23c7d51bda97388cef32163ae93024eed544a5a23b614a5", - "compiled_at": "2026-11-06T03:18:27Z", + "children_root": "sha256:aabb25e3f2c6d8cd4ab5be5fc023baa3e3ca8369189135e5d7bff86049c28bd0", + "compiled_at": "2026-11-06T03:46:27Z", "compiler": "crumb-compile/1", - "digest": "sha256:0c2a34e5c958d9709bfb0632c6dd4e808c7459224589d9b627ccb6a72ac24d3d", + "digest": "sha256:585b5351b24d6225acc57fba1d51bc58a4a36e2d7170ab39cfb548b954f70c48", "evidence_files": 274, "evidence_root": "sha256:af014a4ed8f6fe759fc5809807fb47578d3410811b522d9f65d749382b029802", "files": 3779, - "generated_at_commit": "a7606b179421dcc201cee98ec461166d90e195f0", - "source_tree": "sha256:73eb749dcc0d30a74c2e06697a492946b0bdb0cec587e03d6efd3605618bffce" + "generated_at_commit": "8e84876f88bed4133df98f559c67a41543484aec", + "source_tree": "sha256:576f3be664507a8f5bebeb4d03d3f0aac97b8bfb1718c55b92273176f02f1bf7" }, "owner_lane": "", "provenance": { diff --git a/native/.crumb b/native/.crumb index 95f1d6c3..ad73e996 100644 --- a/native/.crumb +++ b/native/.crumb @@ -80,7 +80,7 @@ }, { "digest": "df204019eddcca08614e507a35057848e2198e76f2b7492f51a9892718f9dc5d", - "last_commit": "a7606b17", + "last_commit": "de58b078", "name": "kernel", "purpose": "Directory native/kernel. Purpose not yet described by a human." }, @@ -116,14 +116,14 @@ } ], "children_root": "sha256:6ce32b63f0a2f5ee3686e2b9f3c1951c0dec4bfe58d8a6eef1b311affc9d6c85", - "compiled_at": "2026-11-06T03:18:27Z", + "compiled_at": "2026-11-06T03:46:27Z", "compiler": "crumb-compile/1", - "digest": "sha256:ec2b543af27bd4f66e49c7e10e64ddc54057ef6cd52328c0ddd7eb0e8c83992f", + "digest": "sha256:5dacfd6f5a49e0687495a865be062de18cf3500ee32f028ef3dba95580caa25a", "evidence_files": 24, "evidence_root": "sha256:ecc7ccf2e924c221a5bac1d91e23b13d8f3c8d78c2a893a882ed7ca5e88d855d", "files": 779, - "generated_at_commit": "a7606b179421dcc201cee98ec461166d90e195f0", - "source_tree": "sha256:d367281c592e948da14f53a9ea51824e1a8e441fbd988e26fdb9ee59c3240f4f" + "generated_at_commit": "8e84876f88bed4133df98f559c67a41543484aec", + "source_tree": "sha256:fb16165100ff79763202e84a6c26774da82034a5cea1983a4e6daaad97e5b340" }, "owner_lane": "", "provenance": { diff --git a/native/om/lm1b/README.md b/native/om/lm1b/README.md index 4fbfebe1..4ed8fc34 100644 --- a/native/om/lm1b/README.md +++ b/native/om/lm1b/README.md @@ -142,6 +142,22 @@ raw outputs are in `evidence/gate/`). The ELF it built has the same SHA-256 as t - Budget 5 on a 19-id prompt: `status cancelled passes 5`, then the next job's tokens and bits equal the reference. - `fault 1`: exit status 112 and no reply line for that job. +- Bounds traps (aienux#481): three copies of the program each change one line of `fn mv`. One reads a row 100 + bytes before the end of the model, so the copy runs past the 2,388,000-byte last pool. One copies a row + one byte longer than `rb`. One rewrites the line with the same value as a control. The first two exit + 103 (trap 3) with no reply line. The control answers with the reference's first two tokens. See + "Bounds checks" below. + +## Bounds checks + +`rowcp` splits a row across two pools and assumes the next pool is long enough. With the pinned tensor +offsets this always holds; if it did not, the fallback is the compiler's per-access check. omc has no +option to turn that check off. It reads the program on stdin and takes no arguments, and `elemaddr` +(`seed/omc/omc.om` at omega-mv 0d72560a, the source of the pinned omc) emits `CMP` plus `B.HS` to trap 3 +for every run-time index of a `get` or `put`. A constant index outside the array is compile error 21. The +boot fixture is meant to run these same ELF bytes, so the checks travel with them. gate.sh step 8e shows +them firing in this program, for both `get` and `put`. [INFERENCE] until the fixture exists: a fixture +that rebuilt the program with another compiler or another pin would need step 8e rerun against it. ## Limits diff --git a/native/om/lm1b/gate.sh b/native/om/lm1b/gate.sh index 43403610..3f58ec8c 100644 --- a/native/om/lm1b/gate.sh +++ b/native/om/lm1b/gate.sh @@ -110,6 +110,28 @@ echo "job f1 gen 2 budget 1000 stop $EOS fault 1 ids $C" > "$O/fault-jobs.txt" "$O/lm1b" 3< "$MODEL" < "$O/fault-jobs.txt" > "$O/fault.out" 2> "$O/fault.err" check fault-exit "$?" 112 check fault-no-reply "$(grep -c '^job f1' "$O/fault.out")" 0 +# 8e. omc bounds-checks every get and put on a global in these bytes (aienux#481): rowcp's pool split assumes the next +# pool is long enough, and the fallback is Omega's per-access trap 3 (exit 103). Three copies of the program differ +# from lm1b.om in one line of fn mv: a row read past the end of the last pool (m48 holds 2,388,000 bytes), a row copy +# one byte longer than rb, and a control that rewrites the same line with the same value. The two out-of-range copies +# must trap with no reply; the control must answer like the reference. +bvar() { + sed "s/^$2\$/$3/" "$HERE/lm1b.om" > "$O/$1.om" + check "$1-edited" "$(cmp -s "$HERE/lm1b.om" "$O/$1.om"; echo $?)" 1 + "$OMC" < "$O/$1.om" > "$O/$1" 2> "$O/$1.err" + check "$1-compile" "$?" 0 + chmod +x "$O/$1" + echo "job $1 gen 2 budget 1000 stop $EOS fault 0 ids $C" | "$O/$1" 3< "$MODEL" > "$O/$1.out" 2>&1 +} +bvar oob-get 'base = get tof ti' 'base = ulong 807694268' +check oob-get-exit "$?" 103 +check oob-get-no-reply "$(grep -c '^job oob-get' "$O/oob-get.out")" 0 +bvar oob-put 'rowcp add base mul r rbs rbs' 'rowcp add base mul r rbs 8193' +check oob-put-exit "$?" 103 +check oob-put-no-reply "$(grep -c '^job oob-put' "$O/oob-put.out")" 0 +bvar oob-ctl 'base = get tof ti' 'base = add get tof ti ulong 0' +check oob-ctl-exit "$?" 0 +check oob-ctl-vs-ref "$(jtok "$O/oob-ctl.out" oob-ctl)" "$(awk 'NR==1{print $1" "$2" "$3} NR==2{print $1" "$2" "$3}' "$O/ref-cow.want")" if [ -z "$FAILS" ]; then echo "RC=0"; exit 0; fi echo "failed:$FAILS"