code wiki / _hdl_build / _ar2_minrepro.nx

_ar2_minrepro.nx

buildroot/runtime/_hdl_build/_ar2_minrepro.nx

2637 B47 linesdepth 3pulls 6 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

_ar2_minrepro.nx -- REGRESSION REPRO for the argon2id runtime defect (issue filed 2026-06-10). Isolated: nx_argon2id_hash segfaults (sig11) with the test's EXACT params + identical ctx alloc; the crash is in STEP 1 `_ar2_h0` (blake2b H0), BEFORE any memory fill. blake2b compiles to valid .s, so this is a RUNTIME codegen/exec defect (miscompile-class), not a source/integration bug. When the crypto/toolchain workers fix it, THIS module must print "_ar2_h0 returned rc=0" and "hash returned rc=0" -> it becomes the argon2id regression gate. NOT my machine_key integration.

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_argon2id.nx _ar2_minrepro.nx

imports: nx_syscalls.nxnx_argon2id.nx

imported by: nobody (leaf or entry point)

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

main _p sys_write mk_ctx sys_mmap _ar2_h0 _ar2_write_le32 nx_blake2b_hash nx_blake2b_init _b2b_iv nx_blake2b_update _b2b_compress _b2b_load_u64_le _b2b_iv ↻ _b2b_mix _b2b_rotr64 _b2b_sigma nx_blake2b_final _b2b_compress ↻ _b2b_store_u64_le _b2b_shr64 _b2b_shr64 ↻ _pn sys_mmap ↻ sys_write ↻ sys_mmap ↻ nx_argon2id_hash _ar2_h0 ↻ _ar2_block_at nx_blake2b_long _b2bl_write_le32 nx_blake2b_hash ↻ _b2bl_copy _ar2_gen_address_block _ar2_write_le64 nx_argon2_g _a2b_load_u64_le _a2b_p _a2b_gb _a2b_rotr64

structs

none

consts

none

functions

9func _p(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
10func _pn(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48;k=1}; while m>0{t[k]=48+(m%10);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(1,bb,k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
11func mk_ctx(m_kib: i64) -> *NxArgon2idCtx
called by 1: main calls 1: sys_mmap
34func main() -> i64