From 7d83327e57ad124f3eebe6ae7c2367bac10d85ec Mon Sep 17 00:00:00 2001 From: Dmitrii Vasilev Date: Sun, 25 Oct 2026 01:44:13 +0700 Subject: [PATCH 1/2] fix(t27os): lv_copy_row copies the row's written bytes, not the dead tail of its slot (Closes #11919) Rebuilt on master b9d83f9ef2: #11920 conflicts only in the lanes_view seal, which master resealed in #12062; the seal is re-made by the lab's master-built t27c. Co-Authored-By: Claude Opus 5.5 --- specs/t27os/lanes_view.t27 | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/specs/t27os/lanes_view.t27 b/specs/t27os/lanes_view.t27 index 736663777f..e81e930f44 100644 --- a/specs/t27os/lanes_view.t27 +++ b/specs/t27os/lanes_view.t27 @@ -544,15 +544,17 @@ pub fn lv_rank(src: u32, state: u32) -> u32 { return LVR_OTHER; } -/// Copy row `a` over row `b` (fields and bytes). +/// Copy row `a` over row `b` (fields and bytes). Only the row's LVF_TLEN bytes are copied: lv_add writes no +/// more, and the rest of the LV_LINE slot is memory nobody wrote. fn lv_copy_row(tab: []u32, txt: []u8, a: u32, b: u32) -> void { + const len : usize = @as(usize, tab[@as(usize, a) * LV_F + LVF_TLEN]); var f : usize = 0; while (f < LV_F) { tab[@as(usize, b) * LV_F + f] = tab[@as(usize, a) * LV_F + f]; f = f + 1; } var i : usize = 0; - while (i < LV_LINE) { + while (i < len) { txt[@as(usize, b) * LV_LINE + i] = txt[@as(usize, a) * LV_LINE + i]; i = i + 1; } @@ -1123,6 +1125,24 @@ test rows_are_ordered_by_importance { assert tab[LVF_ISSUE] == 12 and tab[LV_F + LVF_ISSUE] == 11; } +test a_row_copy_moves_only_the_written_bytes { + var tab : [576]u32 = undefined; + var txt : [5200]u8 = undefined; + var k : usize = 0; + while (k < 2 * LV_LINE) { + txt[k] = 48; + if (k >= LV_LINE) { txt[k] = 35; } + k = k + 1; + } + var n : u32 = 0; + n = lv_add(tab[0..576], txt[0..5200], n, LV_SCRIPT, 7, 0, L_NONE, LVS_RUNNING, 0, 0, "ab"); + n = lv_add(tab[0..576], txt[0..5200], n, LV_SCRIPT, 8, 0, L_NONE, LVS_RUNNING, 0, 0, "x"); + lv_copy_row(tab[0..576], txt[0..5200], 0, 1); + assert lv_row_text(txt[0..5200], tab[0..576], 1) == "ab"; + assert tab[LV_F + LVF_ISSUE] == 7; + assert txt[LV_LINE + 2] == 35 and txt[2 * LV_LINE - 1] == 35; +} + test the_sort_is_stable_for_equal_ranks { var tab : [576]u32 = undefined; var txt : [5200]u8 = undefined; From 262af1cf32e55866ea5dbb21564001df50720a86 Mon Sep 17 00:00:00 2001 From: Dmitrii Vasilev Date: Sun, 25 Oct 2026 01:49:49 +0700 Subject: [PATCH 2/2] chore(seals): t27os_T27osLanesView resealed by the lab's master-built t27c (receipt runs/7d83327e57ad124f3eebe6ae7c2367bac10d85ec.9f16a870.json: t27c 34/34) (Refs #11919) Co-Authored-By: Claude Opus 5.5 --- .trinity/seals/t27os_T27osLanesView.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.trinity/seals/t27os_T27osLanesView.json b/.trinity/seals/t27os_T27osLanesView.json index 890cef4880..d434abd32c 100644 --- a/.trinity/seals/t27os_T27osLanesView.json +++ b/.trinity/seals/t27os_T27osLanesView.json @@ -1,5 +1,5 @@ { - "built_by": "t27c-bootstrap@0.5.2+69eef64da", + "built_by": "t27c-bootstrap@0.5.2+7d83327e5", "closure": [ { "spec": "specs/t27os/agents.t27", @@ -15,23 +15,23 @@ } ], "config": "gen=c,rust,verilog,zig;tests=zig", - "gen_hash_c": "sha256:80addc45c320545c62052700530a65e36714d066aaa820c85d88a49a3294670c", - "gen_hash_rust": "sha256:4b9426ab1fcec614f0eb54af2fa8835d66da36b22336bd360b58ba8001b565d1", - "gen_hash_verilog": "sha256:2a0305d40d7f9d957cd73a43aacc22a21b7923775688a1b52394c58dae8d7b45", - "gen_hash_zig": "sha256:c845b85ca710b13e369bb51b57138972a19dee90f773254aec47ca116e458bf4", + "gen_hash_c": "sha256:64a4959435eb90ce40f5823f531d6e1c2aa0a01241e43a77d8ad86c9774f8a90", + "gen_hash_rust": "sha256:d3fa17e6d5097c06f69311fe93ece154a5910bee8f5bd2d978dc72326cbb4a2b", + "gen_hash_verilog": "sha256:381d71ddebf8ab5f7b88d6842d01df1c2dec009cbd05e6c186fe4e3245470989", + "gen_hash_zig": "sha256:27cdd3529fc6e57f8e079a858a45b0707bc5020b5fb79f601ef69e3a92abb206", "module": "T27osLanesView", "ring": 12, "seal_schema": 2, - "sealed_at": "2026-10-24T16:49:37Z", + "sealed_at": "2026-10-24T18:48:03Z", "sealed_by": "t27c-bootstrap@0.5.2", - "spec_hash": "sha256:3466d553ab57406af0965fe96faa0078a2c52d28df04a1361452efbb756d9680", + "spec_hash": "sha256:7844df92d0477427af306fce15aace05c1962f92177d24b0dc6d4b5d0c39edad", "spec_path": "specs/t27os/lanes_view.t27", "tests": { "failed": 0, "failing": [], "forced": false, - "passed": 33, - "total": 33, + "passed": 34, + "total": 34, "vacuous": 0 }, "toolchain": {