code wiki / _hdl_build / nx_engineer_crash.nx

nx_engineer_crash.nx

buildroot/runtime/_hdl_build/nx_engineer_crash.nx

6122 B145 linesdepth 2pulls 2 transitivereach 36 importersview sourcekind librarytopic engineer
docsdependenciesstructsconstsfunctions

about

nx_engineer_crash.nx -- the Engineer organ that finds CRASHES, not just bad exit codes. The gate runner / race gate read wait_exit_code (bits 8-15) and so see a SIGSEGV as exit 0 -- blind to the worst failure. A self-sufficient team must catch its own crashes. This decodes the FULL wait4 status: a process killed by a signal (segfault=11, abort=6, ...) is reported as a CRASH with the signal number, and its captured stdout is preserved so the LAST line localizes where it died. wait4 status (Linux): low 7 bits = terminating signal (0 = exited normally, 0x7f = stopped); bits 8-15 = exit code when exited normally.

dependencies 1 imports · 23 importers

nx_syscalls.nx nx_engineer_crash.nx nx_asm_selfheal_test.nx nx_author.nx nx_autoopt_library_test.nx nx_autorace_test.nx nx_boolhunt.nx nx_builder.nx nx_cost_race_test.nx nx_doctor_datadriven_test.nx nx_doctor_fix_test.nx nx_doctor_import_gate.nx

diagram shows first 10 each side; +0 more imports, +13 more importers in the complete lists below.

imports: nx_syscalls.nx

imported by: nx_asm_selfheal_test.nxnx_author.nxnx_autoopt_library_test.nxnx_autorace_test.nxnx_boolhunt.nxnx_builder.nxnx_cost_race_test.nxnx_doctor_datadriven_test.nxnx_doctor_fix_test.nxnx_doctor_import_gate.nxnx_engineer_build_gate.nxnx_engineer_crash_test.nxnx_engineer_gate_runner.nxnx_horizontal_test.nxnx_layer_campaign.nxnx_levels_test.nxnx_mulchain_test.nxnx_overnight.nxnx_overnight_conductor.nxnx_self_heal_conductor.nxnx_selfix_test.nxnx_superopt_race_test.nxnx_team_tick.nx

structs

none

consts

none

functions

15func eng_run(binpath: *u8, capf: *u8) -> i64
43func eng_compile(compiler: *u8, src: *u8, sout: *u8) -> i64
77func eng_compile_diag(compiler: *u8, src: *u8, sout: *u8, errout: *u8) -> i64
137func eng_crashed(rc: i64) -> i64 { if rc <= (0 - 1000) { return 1 } return 0 }
138func eng_signal(rc: i64) -> i64 { return (0 - rc) - 1000 }
139func eng_sig_name(sig: i64) -> *u8
called by 1: ec_report