code wiki / (root) / nx_stl_adversarial_test.nx

nx_stl_adversarial_test.nx

buildroot/runtime/nx_stl_adversarial_test.nx

5502 B144 linesdepth 6pulls 10 transitivereach 0 importersview sourcekind gate/prooftopic stl
docsdependenciesstructsconstsfunctions

about

nx_stl_adversarial_test.nx -- Phase A1 of S-class hardening per docs/NISHI_3D_PRINT_SCLASS_HONEST_AUDIT_2026_05_20.md. Operator question: "are we really at s class or still theoretical bullshit, aka will it work like an ak47 in the worst of the worst" Honest answer: not S-class yet. This smoke is the FIRST STONE of adversarial hardening -- proves the binary STL parser gracefully rejects 8 classes of malformed input without crashing or returning false-OK verdicts. What this proves: parser DOES NOT crash on adversarial input + DOES return non-OK verdict on every malformed case + DOES detect class of corruption correctly (TOO_SHORT vs TRUNCATED vs BAD_FLOAT vs ASCII_REFUSED). What this does NOT prove: the parser is bug-free for ALL malformed inputs. Future work: fuzz with longer / randomized byte streams. expect_exit: 0 license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_stl.nx nx_stl_adversarial_test.nx

imports: nx_syscalls.nxnx_stl.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap nx_stl_load_binary sys_mmap ↻ nx_stl_is_ascii nx_le_read_u32 nx_mesh_alloc sys_mmap ↻ nx_stl_next_pow2 nx_hash_new nx_fp32_bytes_to_q14 nx_fp32_bits_to_q14 nx_stl_intern_vertex nx_stl_pack_xyz nx_le_write_u64 nx_le_write_u32 nx_hash_fnv1a_bytes nx_hash_has nx_hash_probe nx_hash_fnv1a_i64 nx_hash_get nx_hash_probe ↻ nx_mesh_get_vertex_x nx_mesh_get_vertex_y nx_mesh_get_vertex_z nx_mesh_set_vertex nx_hash_put nx_hash_probe ↻ nx_mesh_set_triangle

structs

none

consts

none

functions

26func main() -> i64