/[cmucl]/src/code/interr.lisp
ViewVC logotype

Diff of /src/code/interr.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.39 by pmai, Wed Aug 28 13:29:26 2002 UTC revision 1.40 by gerd, Sun Mar 23 21:23:42 2003 UTC
# Line 17  Line 17 
17    
18  (in-package "KERNEL")  (in-package "KERNEL")
19    
20  (export '(infinite-error-protect find-caller-name *maximum-error-depth*))  (export '(infinite-error-protect find-caller-name *maximum-error-depth*
21              red-zone-hit yellow-zone-hit))
22    
23    
24    
# Line 621  Line 622 
622                   (t                   (t
623                    (funcall handler name fp scp arguments)))))))))                    (funcall handler name fp scp arguments)))))))))
624    
625    ;;;
626    ;;; Called from C when the yellow control stack guard zone is hit.
627    ;;; The yellow zone is unprotected in the C code prior to calling this
628    ;;; function, to give some room for debugging.  The red zone is still
629    ;;; protected.
630    ;;;
631    #+stack-checking
632    (defun yellow-zone-hit ()
633      (let ((debug:*stack-top-hint* nil))
634        (format *error-output*
635                "~2&~@<A control stack overflow has occurred: ~
636                the program has entered the yellow control stack guard zone.  ~
637                Please note that you will be returned to the Top-Level if you ~
638                enter the red control stack guard zone while debugging.~@:>~2%")
639        (infinite-error-protect (error 'stack-overflow))))
640    
641    ;;;
642    ;;; Called from C when the red control stack guard zone is hit.  We
643    ;;; could ABORT here, which would usually take us back to the debugger
644    ;;; or top-level, and add code to the restarts re-protecting the red
645    ;;; zone (which can't be done here because we're still in the red
646    ;;; zone).  Using ABORT is too dangerous because users may be using
647    ;;; abort restarts which don't do the necessary re-protecting of the
648    ;;; red zone, and would thus render CMUCL unprotected.
649    ;;;
650    #+stack-checking
651    (defun red-zone-hit ()
652      (format *error-output*
653              "~2&~@<Fatal control stack overflow.  You have entered ~
654               the red control stack guard zone while debugging.  ~
655               Returning to Top-Level.~@:>~2%")
656      (throw 'lisp::top-level-catcher nil))
657    
658    

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40

  ViewVC Help
Powered by ViewVC 1.1.5