Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Part of #6063 (t27b coverage, lane 5).
t27b refuses every fn or test whose local aggregates take more than 16384 bytes of stack, as FnDecl(frame size). The cap exists because the prologue lowers sp in one step, and a single step larger than the guard page could jump over it without faulting.
specs/port/scripts/gen_w384_lean.t27 is the corpus spec that hits it: its test main_appends_the_exact_w384_text declares var buf: [16384]u8, plus 64 bytes of other locals, for 16448 bytes in one frame. The reference (t27c gen + zig test) passes it, 12 tests, 0 vacuous.
Plan:
- New conformance spec
specs/tri/t27b/conformance/large_frame.t27, written first and passingt27c test-report(4 of 4, 9 runtime asserts). It covers a test body with a 20000-byte array, a fn with 48000 bytes called twice, 16384 + 64 bytes (the w384 shape), and recursion 12 frames deep at 20000 bytes each. - Codegen (
cli/t27b/src/codegen.rs): a frame larger than 16 KiB is allocated in 4096-byte steps, and each step stores to the newspbefore the next one (stack probing, the same idea as GCC's-fstack-clash-protectionon AArch64). The remainder is probed too. Frames up to 16 KiB keep their current one-step prologue. The cap rises from 16 KiB to 1 MiB, and frames above 1 MiB are still refused asFnDecl(frame size). - The spec is not edited to squeeze under the old cap.
- Ledger: gen_w384_lean moves from
codegentopass, and the new spec gets apassrow, if the lab corpus run agrees.
Boundary
specs/port/scripts/gen_w384_lean.t27specs/tri/t27b/conformance/large_frame.t27cli/t27b/src/codegen.rs
User Scenarios
- Given a test declares a local array of 20000 bytes, When the test is compiled with t27b, Then the function prologue allocates the frame in 4096-byte steps with a store to the new
spat each step before continuing. - Given a function declares 48000 bytes of local aggregates and is called twice from a test, When the test runs under t27b, Then both calls execute without stack fault and the frame size cap permits up to 1 MiB.
- Given the existing corpus spec
specs/port/scripts/gen_w384_lean.t27with its testmain_appends_the_exact_w384_textusing 16448 bytes of locals, When the suite is run with t27b, Then all 12 tests pass and the spec moves fromcodegentopassin the ledger.
Requirements
- FR-001: The codegen in
cli/t27b/src/codegen.rsMUST emit a prologue that lowersspin increments of 4096 bytes for any frame larger than 16384 bytes, storing to the newspat each increment before the next decrement. - FR-002: The remainder after the last full 4096-byte step MUST also be probed with a store to the final
sp. - FR-003: Frames of 16384 bytes or less MUST keep the existing single-step prologue with no probing stores.
- FR-004: The frame size limit MUST be raised from 16 KiB to 1 MiB (1048576 bytes); frames exceeding 1 MiB MUST still be rejected with
FnDecl(frame size). - FR-005: The new conformance spec
specs/tri/t27b/conformance/large_frame.t27MUST cover four cases: a 20000-byte array in a test, a 48000-byte frame function called twice, a 16448-byte frame matching the w384 shape, and a 12-frame recursion at 20000 bytes each.
Success Criteria
t27c test-report specs/tri/t27b/conformance/large_frame.t27exits 0 with 4 of 4 tests passing and 9 runtime asserts.t27c test-report specs/port/scripts/gen_w384_lean.t27exits 0 with 12 tests passing, 0 vacuous.- The ledger shows
specs/port/scripts/gen_w384_lean.t27moved fromcodegentopass, andspecs/tri/t27b/conformance/large_frame.t27listed aspass.
Activity
policy: foreign-exceptions entry for the t27b frame probe (Refs #7367)
t27b large_frame: every byte of each frame is checked after its calle…
t27b: ledger gen_w384_lean codegen -> pass, large_frame conformance r…
t27b: the large-frame test in one-line string form, so the PR stays i…
Merge t27b-lane5-frame-probe into origin/master (Refs #7367)
Merge t27b-lane5-frame-probe into origin/master (Refs #7367)
gHashTag commentedon Oct 7, 2026
Reopened 2026-10-07: the bulk close of issues without a
## Boundarysection was reverted by the owner. Nothing to do here; this comment replaces the earlier close notice.t27b: frames over 16 KiB, probing the stack one page at a time (Closes …
t27b: frames up to 16 MiB of local aggregates; slot addresses and pro…
github-actions commentedon Oct 17, 2026
Re-filed as #9880.
An attempt claimed this issue on 2026-10-07 and left an empty branch. A dispatch row that has spent its retry ceiling is released once and then keeps its issue for good, which is the right rule for a third identical failure and the wrong outcome for an issue nobody ever attempted twice. The new issue carries the same work, the same boundary, and today's brief.
Closing this one so the swarm can take the work again.
feat(t27b): frame layout law spec-first, rebased on master (union)
t27b: frame layout law spec-first (register classes, frame, probe #7367…