X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.impure.lisp;h=87c22657c767e0ad4f878a6e6b4f854fe5dc48a9;hb=9abfd1a2b22862570c15ffa5129b1196d0480290;hp=c15216a5ff804171b16a1922f97dfb82c0d31212;hpb=7c406887c08477181e869b1b98142d99b52990ac;p=sbcl.git diff --git a/tests/compiler.impure.lisp b/tests/compiler.impure.lisp index c15216a..87c2265 100644 --- a/tests/compiler.impure.lisp +++ b/tests/compiler.impure.lisp @@ -1055,6 +1055,20 @@ (assert (eq :two (type-error-datum e))) (assert (eq 'number (type-error-expected-type e))) :error)))))) + +(with-test (:name :compiled-debug-funs-leak) + (sb-ext:gc :full t) + (let ((usage-before (sb-kernel::dynamic-usage))) + (dotimes (x 10000) + (let ((f (compile nil '(lambda () + (error "X"))))) + (handler-case + (funcall f) + (error () nil)))) + (sb-ext:gc :full t) + (let ((usage-after (sb-kernel::dynamic-usage))) + (when (< (+ usage-before 2000000) usage-after) + (error "Leak"))))) ;;;; tests not in the problem domain, but of the consistency of the ;;;; compiler machinery itself