nx_argcall_repro.nx
buildroot/runtime/nx_argcall_repro.nx
about
nx_argcall_repro.nx -- MINIMAL fast repro of the chat-template crash: a 10-arg function
(same arg SHAPE as tk_bpe_encode: buf, 4 array-subscript i64s, a string-literal *u8, an ilen,
2 scratch *i64, an out *i64) called TWICE in one function. No model load -> iterate in seconds.
If the 2nd call crashes/miscompiles, the bug is call-site codegen for repeated 10-arg calls
(eat-the-debt: root-fix nx_cc). If both calls print correct sums, the bug is in tk_bpe_encode's
body under 2nd-call conditions instead.
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_lib_std.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
| 10 | const K_MAGIC_16384: i64 = 16384 |
| 11 | const K_MAGIC_4096: i64 = 4096 |
functions
| 13 | func rp_enc(buf: *u8, a: i64, b: i64, c: i64, d: i64, input: *u8, ilen: i64, p: *i64, q: *i64, ids: *i64) -> i64 called by 1: main |
| 25 | func main(argc: i64, argv: *i64) -> i64 |