From: Taylor R Campbell Date: Mon, 9 Nov 2009 14:44:11 +0000 (-0500) Subject: Test stack overflow in LIARC interrupt checks. X-Git-Tag: 20100708-Gtk~252 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=6caf4924120b9832d6494e07834ac402f442e92e;p=mit-scheme.git Test stack overflow in LIARC interrupt checks. --- 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)