From 6caf4924120b9832d6494e07834ac402f442e92e Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Mon, 9 Nov 2009 09:44:11 -0500 Subject: [PATCH] Test stack overflow in LIARC interrupt checks. --- src/microcode/liarc.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/microcode/liarc.h b/src/microcode/liarc.h index e5dd5bae6..91f137768 100644 --- a/src/microcode/liarc.h +++ b/src/microcode/liarc.h @@ -291,19 +291,22 @@ typedef unsigned long entry_count_t; #define INTERRUPT_CHECK(code, entry_point) do \ { \ - if (((long) Rhp) >= ((long) GET_MEMTOP)) \ + if ((((long) Rhp) >= ((long) GET_MEMTOP)) \ + || (((long) Rsp) < ((long) GET_STACK_GUARD))) \ INVOKE_INTERFACE_1 (code, (¤t_block[entry_point])); \ } while (false) #define DLINK_INTERRUPT_CHECK(code, entry_point) do \ { \ - if (((long) Rhp) >= ((long) GET_MEMTOP)) \ + if ((((long) Rhp) >= ((long) GET_MEMTOP)) \ + || (((long) Rsp) < ((long) GET_STACK_GUARD))) \ INVOKE_INTERFACE_2 (code, (¤t_block[entry_point]), Rdl); \ } while (false) #define CLOSURE_INTERRUPT_CHECK(code) do \ { \ - if (((long) Rhp) >= ((long) GET_MEMTOP)) \ + if ((((long) Rhp) >= ((long) GET_MEMTOP)) \ + || (((long) Rsp) < ((long) GET_STACK_GUARD))) \ INVOKE_INTERFACE_0 (code); \ } while (false) -- 2.25.1