nx_pageref_gate.nx
buildroot/runtime/nx_pageref_gate.nx
about
nx_pageref_gate.nx -- the IN-PROCESS referee for nx_pageref_lib: the asset-reference vocabulary and the
404-fallback extension class. In-process ON PURPOSE -- the sibling nx_page_verify_gate proves the
DEPLOYED verifier end-to-end over the real edge, and a gate that fork/execs a deployed elf cannot be
mutation-proven. This one imports the lib, so nx_gate_bite can substitute a mutant and watch it die.
EVERY ORACLE BELOW IS A HAND-WRITTEN LITERAL, NEVER A SECOND CALL INTO THE LIB. A tooth that calls the
same function on both sides of its comparison cannot fail: it agrees with a mutant as readily as with
the truth. The skip lengths (5 for src plus its quote, 10 for data-glb plus its quote) and the
extension indices are typed out here independently of pr_len and pr_binext.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_pageref_lib.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 16 | const PRG_SKIP_SRC: i64 = 5 // src= plus its opening quote |
| 17 | const PRG_SKIP_DATAGLB: i64 = 10 // data-glb= plus its opening quote |
| 18 | const PRG_ATTR_SRC: i64 = 0 |
| 19 | const PRG_ATTR_DATAGLB: i64 = 1 |
| 20 | const PRG_QUOTE_DQ: i64 = 34 |
| 21 | const PRG_QUOTE_SQ: i64 = 39 |
| 22 | const PRG_MISS: i64 = 0 - 1 |
| 23 | const PRG_EXT_PNG: i64 = 0 |
| 24 | const PRG_EXT_JS: i64 = 3 |
| 25 | const PRG_EXT_GLB: i64 = 4 |
| 26 | const PRG_EXT_VRM: i64 = 5 |
| 27 | const PRG_EXT_WASM: i64 = 6 |
| 28 | const PRG_EXT_NXDV: i64 = 7 |
| 29 | const PRG_EXT_NXA: i64 = 8 |
| 31 | const PRG_ATTR_DECLARED: i64 = 2 |
| 32 | const PRG_SKIP_CONTENT: i64 = 9 // content= plus its opening quote |
| 33 | const PRG_OFF_META_ATTR: i64 = 23 // <meta name="nishi-nxa" is 22 bytes; the space puts content= at 23 |
| 34 | const PRG_OFF_DESC_ATTR: i64 = 25 // <meta name="description" is 24 bytes; the space puts content= at 25 |
| 35 | const PRG_OFF_DIV_ATTR: i64 = 16 // <div data-x="1" is 15 bytes; the space puts content= at 16 |
| 37 | const PRG_OFF_IMG_ATTR: i64 = 5 // the five bytes of an img tag opening put src= at 5 |
| 38 | const PRG_OFF_CANV_ATTR: i64 = 8 // the eight bytes of a canvas tag opening put data-glb= at 8 |
| 39 | const PRG_CH_s: i64 = 115 |
| 40 | const PRG_CH_d: i64 = 100 |
| 41 | const PRG_CH_o: i64 = 111 |
| 42 | const PRG_CH_c: i64 = 99 |
| 43 | const PRG_LT: i64 = 60 |
| 44 | const PRG_BANG: i64 = 33 |
| 45 | const PRG_OUT_SLOTS: i64 = 2 |
| 46 | const PRG_WORD_BYTES: i64 = 8 |
| 47 | const PRG_BIN_BYTES: i64 = 8 |
| 48 | const PRG_DOCT_BYTES: i64 = 5 |
| 49 | const PRG_WASM_B1: i64 = 97 // a |
| 50 | const PRG_WASM_B2: i64 = 115 // s |
| 51 | const PRG_WASM_B3: i64 = 109 // m |
functions
| 55 | func prg_is(a: i64, b: i64) -> i64 { if a == b { return 1 } return 0 } called by 1: main |
| 57 | func prg_declared(f: *u8) -> i64 |
| 70 | func main() -> i64 |