From b155e49a6327a2dfc282343e540d38366d7e6996 Mon Sep 17 00:00:00 2001 From: Brad Nelson Date: Wed, 4 Jan 2023 21:17:49 -0800 Subject: [PATCH] Intercept division by zero with a fault handler. --- common/interp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/common/interp.h b/common/interp.h index c12851d..f9364e1 100644 --- a/common/interp.h +++ b/common/interp.h @@ -57,6 +57,7 @@ static cell_t *forth_run(cell_t *init_rp) { sigaction(SIGSEGV, &sa, 0); sigaction(SIGBUS, &sa, 0); sigaction(SIGINT, &sa, 0); + sigaction(SIGFPE, &sa, 0); #endif return 0; }