X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fdebug.impure.lisp;h=3204f72b62849ef825a1e06bdc702a1b797d98d7;hb=cff4add8f008056edf4c876260c6be8ba804b24c;hp=18cf13750bcd205c9f842eaa13020088ec6a2727;hpb=d7e93ea622be8b9e853b7e3da392ab2d643a3094;p=sbcl.git diff --git a/tests/debug.impure.lisp b/tests/debug.impure.lisp index 18cf137..3204f72 100644 --- a/tests/debug.impure.lisp +++ b/tests/debug.impure.lisp @@ -469,6 +469,20 @@ (load (compile-file "bug-414.lisp")) (disassemble 'bug-414))) +(with-test (:name :bug-310175) + (let ((dx-arg (cons t t))) + (declare (dynamic-extent dx-arg)) + (flet ((dx-arg-backtrace (x) + (declare (optimize (debug 2))) + (prog1 (sb-debug:backtrace-as-list 10) + (assert (sb-debug::stack-allocated-p x))))) + (declare (notinline dx-arg-backtrace)) + (assert (member-if (lambda (frame) + (and (consp frame) + (equal '(flet dx-arg-backtrace) (car frame)) + (notany #'sb-debug::stack-allocated-p (cdr frame)))) + (dx-arg-backtrace dx-arg)))))) + ;;;; test infinite error protection (defmacro nest-errors (n-levels error-form)