diff --git a/compiler/x86/parms.lisp b/compiler/x86/parms.lisp index 88095da5b6f6459b8cba21ec54c737998df067bb..216e44963a2fc4b11ca47313f47db17e486aacdf 100644 --- a/compiler/x86/parms.lisp +++ b/compiler/x86/parms.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/parms.lisp,v 1.25 2003/09/26 15:37:11 toy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/parms.lisp,v 1.26 2003/10/24 04:29:14 toy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -197,6 +197,8 @@ (export '(halt-trap pending-interrupt-trap error-trap cerror-trap breakpoint-trap function-end-breakpoint-trap single-step-breakpoint-trap + dynamic-space-overflow-error-trap + dynamic-space-overflow-warning-trap object-not-list-trap object-not-instance-trap trace-table-normal trace-table-call-site trace-table-function-prologue trace-table-function-epilogue)) @@ -208,7 +210,10 @@ cerror breakpoint function-end-breakpoint - single-step-breakpoint) + single-step-breakpoint + dynamic-space-overflow-warning + dynamic-space-overflow-error + ) (defenum (:prefix object-not- :suffix -trap :start 16) list @@ -256,6 +261,8 @@ kernel::internal-error #+stack-checking kernel::yellow-zone-hit #+stack-checking kernel::red-zone-hit + #+heap-overflow-check kernel::dynamic-space-overflow-warning-hit + #+heap-overflow-check kernel::dynamic-space-overflow-error-hit di::handle-breakpoint lisp::fdefinition-object @@ -311,6 +318,7 @@ ;; Spare symbols. Rename these when you need to add some static ;; symbols and don't want to do a cross-compile. + spare-9 spare-8 spare-7 spare-6 diff --git a/lisp/interrupt.c b/lisp/interrupt.c index 3eda3821aa47065ea8517b2f20a04f56c1e293b9..d8e1a6dfaf5caddf277a38146f9d9949016faa84 100644 --- a/lisp/interrupt.c +++ b/lisp/interrupt.c @@ -1,4 +1,4 @@ -/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/interrupt.c,v 1.31 2003/10/24 02:57:00 toy Exp $ */ +/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/interrupt.c,v 1.32 2003/10/24 04:29:14 toy Exp $ */ /* Interrupt handing magic. */ @@ -633,7 +633,11 @@ unsigned long install_handler(int signal, void interrupt_handle_space_overflow(lispobj error, struct sigcontext *context) { - +#ifdef i386 + /* ECX is the argument count. */ + context->sc_eip = (int) ((struct function *) PTR (error))->code; + context->sc_ecx = 0; +#elif build_fake_control_stack_frame (context); /* This part should be common to all non-x86 ports */ SC_PC(context) = (long) ((struct function *) PTR (error))->code; @@ -643,6 +647,7 @@ interrupt_handle_space_overflow(lispobj error, struct sigcontext *context) SC_REG(context, reg_CFP) = (long) current_control_frame_pointer; /* This is sparc specific */ SC_REG(context, reg_CODE) = ((long) PTR(error)) + type_FunctionPointer; +#endif } void interrupt_init(void) diff --git a/lisp/x86-arch.c b/lisp/x86-arch.c index a3d03951a02452b3387b7c8478fedcb7b1f5fbe3..3be564896990e66db6253247081bca29c0e0deb5 100644 --- a/lisp/x86-arch.c +++ b/lisp/x86-arch.c @@ -1,6 +1,6 @@ /* x86-arch.c -*- Mode: C; comment-column: 40 -*- * - * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/x86-arch.c,v 1.19 2002/11/02 23:47:28 toy Exp $ + * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/x86-arch.c,v 1.20 2003/10/24 04:29:14 toy Exp $ * */ @@ -278,6 +278,18 @@ void sigtrap_handler(HANDLER_ARGS) context->sc_pc = (int) handle_function_end_breakpoint(signal, code, context); break; +#ifdef trap_DynamicSpaceOverflowWarning + case trap_DynamicSpaceOverflowWarning: + interrupt_handle_space_overflow(SymbolFunction(DYNAMIC_SPACE_OVERFLOW_WARNING_HIT), + context); + break; +#endif +#ifdef trap_DynamicSpaceOverflowError + case trap_DynamicSpaceOverflowError: + interrupt_handle_space_overflow(SymbolFunction(DYNAMIC_SPACE_OVERFLOW_ERROR_HIT), + context); + break; +#endif default: DPRINTF(0,(stderr,"[C--trap default %d %d %x]\n", signal, code,context)); #ifdef __linux__ diff --git a/lisp/x86-assem.S b/lisp/x86-assem.S index b307bc1426c91a271f6f105be6b1cf69ccac39c5..5581f9ea4d3c5f15a44631d6fb5ab72520180556 100644 --- a/lisp/x86-assem.S +++ b/lisp/x86-assem.S @@ -1,6 +1,6 @@ ### x86-assem.S -*- Mode: Asm; -*- /** - * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/x86-assem.S,v 1.23 2002/08/28 13:29:25 pmai Exp $ + * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/x86-assem.S,v 1.24 2003/10/24 04:29:14 toy Exp $ * * Authors: Paul F. Werkowski <pw@snoopy.mv.com> * Douglas T. Crosher @@ -327,6 +327,29 @@ GNAME(do_pending_interrupt): .byte trap_PendingInterrupt ret .size GNAME(do_pending_interrupt),.-GNAME(do_pending_interrupt) + +#ifdef trap_DynamicSpaceOverflowError + .global GNAME(do_dynamic_space_overflow_error) + .type GNAME(do_dynamic_space_overflow_error),@function + .align align_4byte,0x90 +GNAME(do_dynamic_space_overflow_error): + int3 + .byte trap_DynamicSpaceOverflowError + ret + .size GNAME(do_dynamic_space_overflow_error),.-GNAME(do_dynamic_space_overflow_error) +#endif + +#ifdef trap_DynamicSpaceOverflowWarning + .global GNAME(do_dynamic_space_overflow_warning) + .type GNAME(do_dynamic_space_overflow_warning),@function + .align align_4byte,0x90 +GNAME(do_dynamic_space_overflow_warning): + int3 + .byte trap_DynamicSpaceOverflowWarning + ret + .size GNAME(do_dynamic_space_overflow_warning),.-GNAME(do_dynamic_space_overflow_warning) +#endif + #ifdef WANT_CGC /* A copy function optimized for the Pentium and works ok on