Stage D batch 1: fix silent error sites in repl.c and inference_words.c (FABRIC-3.md §XXXII.6)
Build / build-amd64-iso (push) Canceled after 0s
Build / build-aarch64-iso (push) Canceled after 0s
Build / build-riscv64-img (push) Canceled after 0s

repl.c's sk_word_blk_attach_ack() and inference_words.c's array_ptr()
helper + infer_word_run()'s allocation guard now log a diagnostic via
log_message(LOG_ERROR, ...) before setting vm->error, matching
defer_words.c's own gold-standard pattern (§XXXII.3) -- these are
internal/background conditions (a malformed message-callback, a bad
array reference or allocation failure), not interactive usage mistakes,
so the fix keeps the fault and reports it rather than dropping it like
USE's own fix did.

Batched together (4 sites total, smaller combined than the next file)
rather than two separate acceptance cycles for negligible size.

Three-arch clean qemu acceptance passed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWpNjdwPtFLuVLaAq44L9K
This commit is contained in:
Robert Allan James
2026-09-15 16:23:14 -04:00
co-authored by Claude Sonnet 5
parent 09959c6ca2
commit 5417ffb2bf
11 changed files with 27189 additions and 3 deletions
+5 -1
View File
@@ -228,7 +228,11 @@ static sk_blk_attach_pending_t *g_blk_attach_pending = (void *)0;
* failed blk_subsys_attach_device() call, and simply never births
* anything for this attach. */
static void sk_word_blk_attach_ack(VM *vm) {
if (vm->dsp < 1) { vm->error = 1; return; }
if (vm->dsp < 1) {
log_message(LOG_ERROR, "BLK-ATTACH-ACK: stack underflow");
vm->error = 1;
return;
}
cell_t ok_flag = vm_pop(vm);
cell_t dev_addr = vm_pop(vm);
blkio_dev_t *dev = (blkio_dev_t *)(uintptr_t)dev_addr;