X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fexhaust.impure.lisp;h=fc432b4f4802549e6b415952becdc0145ddfd900;hb=5f492c8a8eea8a407d82de104e16b7148a7f9eb8;hp=54bd7e7b3a5a7d60b45bf7db930d13060df48766;hpb=2481b0d0f223640c43032f75b689608f8fa332db;p=sbcl.git diff --git a/tests/exhaust.impure.lisp b/tests/exhaust.impure.lisp index 54bd7e7..fc432b4 100644 --- a/tests/exhaust.impure.lisp +++ b/tests/exhaust.impure.lisp @@ -1,4 +1,4 @@ -;;;; tests of the system's ability to catch resource exhaustion errors +;;;; tests of the system's ability to catch resource exhaustion problems ;;;; This software is part of the SBCL system. See the README file for ;;;; more information. @@ -14,13 +14,19 @@ (cl:in-package :cl-user) ;;; Prior to sbcl-0.7.1.38, doing something like (RECURSE), even in -;;; safe code, would crash the entire Lisp process. Now it should -;;; signal an error in a context where the soft stack limit has been -;;; relaxed enough that the error can be handled. +;;; safe code, would crash the entire Lisp process. Then the soft +;;; stack checking was introduced, which checked (in safe code) for +;;; stack exhaustion at each lambda. + +;;; Post 0.7.6.1, this was rewritten to use mprotect()-based stack +;;; protection which does not require lisp code to check anything, +;;; and works at all optimization settings. However, it now signals a +;;; STORAGE-CONDITION instead of an ERROR, so this test needs revising (locally - (declare (optimize safety)) (defun recurse () (recurse) (recurse)) - (ignore-errors (recurse))) + (handler-case + (recurse) + (storage-condition (c) (declare (ignore c)) (quit :unix-status 104)))) -;;; success -(quit :unix-status 104) +;;; oops +(quit :unix-status 1)