B7013: C code the program called faulted
Catalog status: active. Default severity: error. Stable name: foreign-fault. Family: Driver and session failures.
veradic run (and the REPL) runs the program inside veradic. When C code the program calls through Import faults (a segmentation fault, a bus error, an arithmetic fault or an illegal instruction), the run ends with this report instead of ending veradic; the address is where the fault happened. Verada proves the program's own code, not the C code it calls: its contract is assumed (B8002).
Example (Vada)
procedure Crash (N : Integer)
with Import, Convention => C, External_Name => "crash", Global => null;
...
Crash (1); -- the C function writes through a null pointerExample (Varc)
fn crash(n: Integer) @Import @Convention(C) @External_Name("crash") @Global(null);
...
crash(1); // the C function writes through a null pointer
What to do
Fix the C code, or the arguments the program passes it; a native build (veradic build) of the program faults the same way, under a debugger if need be.
Regression source and further reading
Complete regression example: source, command arguments and expected results. The fixture deliberately reproduces this diagnostic.
See driver and session failures, the code index, and diagnostic interpretation for modes, replay, fix-its and JSON.