code wiki / (root) / nx_getpid_const_probe.nx

nx_getpid_const_probe.nx

buildroot/runtime/nx_getpid_const_probe.nx

1009 B18 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind probe
docsdependenciesstructsconstsfunctions

about

nx_getpid_const_probe.nx -- discriminator for the emit_syscall CONST-PATH bug on getpid(39): same binary, three shapes: (a) literal 39 in a leaf fn, (b) 39 via runtime parameter, (c) literal 39 inline in main. If (a)/(c) differ from (b), the const path mistranslates 39. license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_lib_std.nx nx_getpid_const_probe.nx

imports: nx_lib_std.nx

imported by: nobody (leaf or entry point)

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

main std_puts std_slen sys_write std_pdec sys_mmap std_itoa sys_mmap ↻ sys_write ↻ cgp vgp

structs

none

consts

6const K_MAGIC_2277: i64 = 2277

functions

8func cgp() -> i64 { return __syscall(172, 0, 0, 0, 0, 0, 0) } // rv64 getpid=172. This probe -- the STANDING DISCRIMINATOR for this very bug -- was itself written in the broken raw-x86 form: 39 IS an RV64 KEY (umount2) translated to ioctl(16) -> -ENOTTY (debt idx K_MAGIC_2277)
called by 1: main
9func vgp(nr: i64) -> i64 { return __syscall(nr, 0, 0, 0, 0, 0, 0) }
called by 1: main
11func main(argc: i64, argv: *i64) -> i64