X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Finterr.lisp;h=4ee10eef89819d77785c7aca40d462273a925071;hb=5bf4a6a677c80a71dfa31b5c9c374f986594392f;hp=24191be31f86f4a90ef59a03a46af0aac7543c6b;hpb=80304981972c91c1b3f3fca75f36dacf1fecf307;p=sbcl.git diff --git a/src/code/interr.lisp b/src/code/interr.lisp index 24191be..4ee10ee 100644 --- a/src/code/interr.lisp +++ b/src/code/interr.lisp @@ -173,17 +173,12 @@ :datum object :expected-type 'symbol)) -(deferr undefined-symbol-error (fdefn-or-symbol) +(deferr undefined-fun-error (fdefn-or-symbol) (error 'undefined-function :name (etypecase fdefn-or-symbol (symbol fdefn-or-symbol) (fdefn (fdefn-name fdefn-or-symbol))))) -(deferr object-not-coerceable-to-fun-error (object) - (error 'type-error - :datum object - :expected-type 'coerceable-to-fun)) - (deferr invalid-arg-count-error (nargs) (error 'simple-program-error :format-control "invalid number of arguments: ~S" @@ -255,10 +250,12 @@ :format-arguments (list key-name))) (deferr invalid-array-index-error (array bound index) - (error 'simple-error + (error 'simple-type-error :format-control "invalid array index ~W for ~S (should be nonnegative and <~W)" - :format-arguments (list index array bound))) + :format-arguments (list index array bound) + :datum index + :expected-type `(integer 0 (,bound)))) (deferr object-not-simple-array-error (object) (error 'type-error @@ -453,10 +450,17 @@ (/show0 "about to bind ERROR-NUMBER and ARGUMENTS") (multiple-value-bind (error-number arguments) (sb!vm:internal-error-args alien-context) + + ;; There's a limit to how much error reporting we can usefully + ;; do before initialization is complete, but try to be a little + ;; bit helpful before we die. (/show0 "back from INTERNAL-ERROR-ARGS, ERROR-NUMBER=..") (/hexstr error-number) (/show0 "cold/low ARGUMENTS=..") (/hexstr arguments) + (unless *cold-init-complete-p* + (%primitive print "can't recover from error in cold init, halting") + (%primitive sb!c:halt)) (multiple-value-bind (name sb!debug:*stack-top-hint*) (find-interrupted-name) @@ -487,3 +491,13 @@ arguments)))) (t (funcall handler name fp alien-context arguments))))))))) + +(defun control-stack-exhausted-error () + (let ((sb!debug:*stack-top-hint* nil)) + (infinite-error-protect + (format *error-output* + "Control stack guard page temporarily disabled: proceed with caution~%") + (error 'control-stack-exhausted)))) + + +