← board

regression: test-c-conformance-riscv32#shard0/6 red at ba5b85d6122d (auto-filed by twatch)

Repro

tools/testmgr.py --tier full --job 'test-c-conformance-riscv32#shard0/6' at ba5b85d6122d674c1b76890b52135618f70ea630

Range

bad ba5b85d6122d, last good ba5b85d6122d, 0 commit(s) in range — the watcher narrows this by idle bisect; check tstate/TSTATE.md for the current range.

Log tail

FAIL 00187.c — output mismatch:
    --- library_candidates/c-testsuite/tests/single-exec/00187.c.expected	2026-07-07 21:11:07.000000000 +0200
    +++ /tmp/pxx_c_conformance.713527/out.txt	2026-07-15 09:20:06.728716445 +0200
    @@ -11,17 +11,3 @@
     ch: 108 'l'
     ch: 111 'o'
     ch: 10 '.'
    -ch: 104 'h'
    -ch: 101 'e'
test-c-conformance-riscv32: 36 pass, 1 fail, 0 skip (of 37)
test-c-conformance-riscv32: FAILURES: 00187.c(output)

Stub ticket: signal only. Track T agent (face 2) enriches or a dev track takes it from the repro line.

Triage (2026-07-17, T face-2 enrich)

Real riscv32-specific libc-free stdio/file-VFS bug — not a flake. 00187.c does file I/O: fwrite("hello\nhello\n", 1, 12, f) (12 bytes) then reads it back via fread, fgetc, getc, fgets loops. Output truncates at exactly 6 of 12 bytes: the first fgetc loop stops after the first hello\n (ch: 10 '.') and never reaches the second hello (ch: 104 'h' onward). Deterministic (36 pass / 1 fail, output mismatch — not timing).

Resolution (2026-07-17) — already fixed on HEAD

No longer reproduces. Rebuilt the HEAD pascal26, compiled 00187.c for riscv32 with the same flags the runner uses (--target=riscv32 -Ilib/crtl/include -Ilib/crtl/src), ran under tools/run_target.sh riscv32:

The 6-of-12 stdio truncation was fixed by a commit in ba5b85d6..HEAD — most likely the cross IO-lock / stdio-path rework ([[feature-threadsafe-io-lock-cross]], ca63cb7b / 9d72203e), which reworked the crtl IO write path where a short-write / buffer-flush truncation of exactly that shape lives. Not bisected to the exact commit (would need an old-compiler rebuild for a ticket that is already green); the fix is verified by the 3/3 + shard-green above.

(Lesson recorded: reproduce a stale auto-filed regression against HEAD before triaging its internals — this one, asyncecho, and the parked pasmith divergences were all already fixed by intervening work. The initial "empty output" I saw was self-inflicted — a compile missing the -Ilib/crtl includes, not the bug.)