nx_probe_crash_live.nx source
↩ module page · 13 lines · 596 B
1// nx_probe_crash_live.nx -- WITNESS for nx_crash.nx (v11 rung 1a): a guarded null-page deref
2// must (a) still die by the ORIGINAL signal (shell reports 139 = 128+SIGSEGV), and (b) print
3// the crash diagnostic on stderr naming the EXACT planted fault address 64 = 0x...40 -- which
4// empirically proves the siginfo si_addr offset AND the kernel->NishiLang handler ABI at once.
5// The gate greps stderr for "touching address" + "40" and asserts exit 139.
6import "nx_crash.nx"
7
8func main(argc: i64, argv: *u8) -> i64 {
9 nx_crash_guard()
10 let p: *i64 = 64 as *i64
11 let x: i64 = *p
12 return x
13}