code wiki / _hdl_build / nx_probe_intptr_live.nx

nx_probe_intptr_live.nx

buildroot/runtime/_hdl_build/nx_probe_intptr_live.nx

1337 B21 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind probetopic probe
docsdependenciesstructsconstsfunctions

about

nx_probe_intptr_live.nx -- LIVE WITNESS for the REVERSE call-arg type direction (2026-08-05): a NON-CONST typed INTEGER (here argc, a parameter) passed into a *u8 parameter must BUILD-FAIL with `argument type mismatch`. ⚠A `let n: i64 = 7` argument does NOT witness this: an integer LITERAL is exempt by design (VK_CONST_INT -- the sentinel/null idiom), and using one silently tests the exemption instead of the check. This direction was DISABLED from 2026-08-01 until two root fixes landed: (1) the `as T` cast no longer mutates its operand's type in place, (2) pointer arithmetic (`ptr + int`) keeps its POINTER type instead of decaying to i64 -- the latter is what made the corpus idiom `emit(out + o, cap - o)` look like an integer argument and produced the 57/70 residue. Both gated by nx_cc_equiv_gate 10/10 + selfhost, shipped via promote_toolchain (canary GREEN). REPRO: change pn_ptr(b) below to pn_ptr(b) and /api/build this target -> refusal expected. Kept VALID in-tree (compiler-root probe convention); the witness is the edit+build cycle. license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_probe_intptr_live.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 pn_ptr sys_exit

structs

none

consts

none

functions

15func pn_ptr(p: *u8) -> i64 { return p[0] as i64 }
called by 1: main
16func main(argc: i64, argv: *i64) -> i64