nx_ctrlbyte_gate.nx
buildroot/runtime/nx_ctrlbyte_gate.nx
about
nx_ctrlbyte_gate.nx -- CONTROL-BYTE CORRUPTION TOOTH (debt 1785520719 / 1785521381, 2026-07-31).
THE WOUND: 210 .nx sources had ONE LINE INSIDE putn overwritten by a run of 0x0E (Shift-Out) bytes.
Every organ so hit printed EMPTY status=, bytes= and counts -- a fleet of blind instruments.
It survived because BOTH existing rulers called it healthy: nx_srcguard rules on SYMBOLS (a line
replaced inside a function changes no top-level symbol, so it can never fire) and nx_fs read
RENDERS A 0x0E RUN AS AN INNOCENT BLANK LINE. A symbol ruler and a byte ruler answer DIFFERENT
questions; the corpus had only the first.
This is the byte ruler: any byte outside {tab, LF, CR, printable, UTF-8 >=0x80} in a .nx file is RED.
A rule nothing must remember beats a list nobody maintains.
verbs: scan [dir] | selftest <writable-scratch-dir>
expect_exit: 0 license_tier: ORIGINAL
dependencies 1 imports · 0 importers
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
structs
| none |
consts
| 14 | const CB_DIRBUF: i64 = 131072 |
| 15 | const CB_FCAP: i64 = 4194304 |
| 16 | const CB_PATH: i64 = 1024 |
| 17 | const CB_DT_DIR: i64 = 4 |
| 18 | const CB_MODE_644: i64 = 420 |
| 19 | const CB_MAX_REPORT: i64 = 40 |
| 20 | const CB_SIG_RUN: i64 = 119 |
functions
| 22 | func cb_vlen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 23 | func cb_puts(s: *u8) -> i64 { sys_write(1, s, cb_vlen(s)); return 0 } |
| 24 | func cb_putn(v: i64) -> i64 |
| 35 | func cb_hex2(v: i64) -> i64 |
| 46 | func cb_is_bad(c: i64) -> i64 |
| 55 | func cb_ends_nx(nm: *u8) -> i64 |
| 64 | func cb_join(dst: *u8, dir: *u8, nm: *u8) -> i64 |
| 76 | func cb_scan_file(path: *u8, buf: *u8, reported: *i64) -> i64 |
| 112 | func cb_scan_dir(dir: *u8, recurse: i64, buf: *u8, stats: *i64, reported: *i64) -> i64 called by 2: cb_scan_dirmain calls 11: sys_openat_rdsys_mmapsys_getdents64dirent_reclendirent_namedirent_type+5 |
| 153 | func cb_write_file(path: *u8, data: *u8, n: i64) -> i64 |
| 161 | func main(argc: i64, argv: *i64) -> i64 |