code wiki / _hdl_build / nx_term_kat.nx

nx_term_kat.nx

buildroot/runtime/_hdl_build/nx_term_kat.nx

1798 B51 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic term
docsdependenciesstructsconstsfunctions

about

nx_term_kat.nx -- KAT (known-answer test) for the unterminated-final-block bug class, distilled from the nx_ttt_evaluate draw-detect miscompile (2026-06-09). The trap shape: a VOID function whose body ends with a while loop that contains an early-return if. The buggy frontend left the loop-exit block (holding the post-loop stores) with NO terminator, so it FELL THROUGH into the if-body block emitted after it -- the post-loop stores were silently clobbered by the early-return stores. This KAT must stay GREEN forever. It prints a marker AND exits 0, so it is judgeable through marker-grep even on channels where $? lies (see feedback-wsl-exit-code-judging-2026-06-09). license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_term_kat.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap tk_scan sys_write

structs

none

consts

none

functions

18func tk_scan(s: *i64)
called by 1: main
32func main() -> i64