nx_addrof_test.nx
buildroot/runtime/nx_addrof_test.nx
about
nx_addrof_test.nx -- PREVENT/MONITOR pillar for the address-of-local
codegen bug class (T#native-addrof).
BUG (found 2026-05-28): bare `&x` on an alloca-backed local returned
the raw alloca value-id, which the codegen AUTO-LOADS (movq slot) ->
the slot CONTENTS were passed as a pointer -> SEGV. Latent in
nx_jose's `&off` (never run under the native compiler).
FIX: parser emits OP_ADDR_OF -> codegen uses the AS-ADDRESS (leaq)
path. THIS test is the regression guard: any reintroduction of the
auto-load behavior fails it loudly.
Run under the native compiler in the daily smoke.
dependencies 1 imports · 0 importers
imports: nx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| 16 | struct AoPair { a: i64, b: i64 } |
consts
| none |
functions
| 18 | func ao_bump(p: *i64) -> i64 { p[0] = p[0] + 41; return 0 } called by 1: main |
| 21 | func ao_set_ptr(out: *i64, val: i64) -> i64 |
| 28 | func main() -> i64 |