code wiki / _hdl_build / nx_crash_probe.nx
nx_crash_probe.nx source
↩ module page · 9 lines · 399 B
1// nx_crash_probe.nx -- a deliberate runtime crash (null deref) to TEST that the build runner auto-captures a
2// RUNTIME-CRASH signal to the backlog. Compiles cleanly; SIGSEGVs at runtime. license_tier: ORIGINAL
3import "nx_syscalls.nx"
4func main() -> i64 {
5 sys_write(1, "crash-probe: about to null-deref (expected SIGSEGV)\n" as *u8, 51)
6 let p: *i64 = 0 as *i64
7 p[0] = 42
8 return 0
9}