code wiki / _hdl_build / nx_recycler_intguard.nx

nx_recycler_intguard.nx

buildroot/runtime/_hdl_build/nx_recycler_intguard.nx

1738 B32 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic recycler
docsdependenciesstructsconstsfunctions

about

nx_recycler_intguard.nx -- a checked-arithmetic primitive RECYCLED FROM the integer-overflow CVE class (the real intake artifact is knowledge/fetched/recyc_intoverflow.raw; the recycler's assess engine scored this NEEDS-GATE, cross-linked to our own LM-005 integer landmine). Nishi is integer-only (i64) -> overflow IS our surface: sizes, counts, money-in-cents (the inventory/estate engines) and seg-store offsets can silently wrap. These detect i64 overflow WITHOUT needing huge literals (sign-rule for add, division-check for mul), so load-bearing arithmetic can fail LOUD instead of wrapping to garbage. The 4th recycler CONVERT (after bounds/sovereignty/ubscan). ORIGINAL

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_recycler_intguard.nx nx_recycler_intguard_gate.nx

imports: nx_syscalls.nx

imported by: nx_recycler_intguard_gate.nx

structs

none

consts

none

functions

10func ig_add_ovf(a: i64, b: i64) -> i64
called by 1: ig_add_checked
17func ig_mul_ovf(a: i64, b: i64) -> i64
called by 1: ig_mul_checked
25func ig_add_checked(a: i64, b: i64, ok: *i64) -> i64
called by 1: main calls 1: ig_add_ovf
29func ig_mul_checked(a: i64, b: i64, ok: *i64) -> i64
called by 1: main calls 1: ig_mul_ovf