gencgc: Make MAKE-LISP-OBJ of SIMPLE-FUN object addresses work.
[sbcl.git] / tests / debug.impure.lisp
1 ;;;; This file is for testing debugging functionality, using
2 ;;;; test machinery which might have side effects (e.g.
3 ;;;; executing DEFUN).
4
5 ;;;; This software is part of the SBCL system. See the README file for
6 ;;;; more information.
7 ;;;;
8 ;;;; While most of SBCL is derived from the CMU CL system, the test
9 ;;;; files (like this one) were written from scratch after the fork
10 ;;;; from CMU CL.
11 ;;;;
12 ;;;; This software is in the public domain and is provided with
13 ;;;; absolutely no warranty. See the COPYING and CREDITS files for
14 ;;;; more information.
15
16 (cl:in-package :cl-user)
17
18 ;;; The debugger doesn't have any native knowledge of the interpreter
19 (when (eq sb-ext:*evaluator-mode* :interpret)
20   (sb-ext:quit :unix-status 104))
21
22 \f
23 ;;;; Check that we get debug arglists right.
24
25 ;;; FIXME: This should use some get-argslist like functionality that
26 ;;; we actually export.
27 ;;;
28 ;;; Return the debug arglist of the function object FUN as a list, or
29 ;;; punt with :UNKNOWN.
30 (defun get-arglist (fun)
31   (declare (type function fun))
32   ;; The Lisp-level type FUNCTION can conceal a multitude of sins..
33   (case (sb-kernel:widetag-of fun)
34     (#.sb-vm:simple-fun-header-widetag
35       (sb-kernel:%simple-fun-arglist fun))
36     (#.sb-vm:closure-header-widetag (get-arglist
37                                      (sb-kernel:%closure-fun fun)))
38     ;; In code/describe.lisp, ll. 227 (%describe-fun), we use a scheme
39     ;; like above, and it seems to work. -- MNA 2001-06-12
40     ;;
41     ;; (There might be other cases with arglist info also.
42     ;; SIMPLE-FUN-HEADER-WIDETAG and CLOSURE-HEADER-WIDETAG just
43     ;; happen to be the two case that I had my nose rubbed in when
44     ;; debugging a GC problem caused by applying %SIMPLE-FUN-ARGLIST to
45     ;; a closure. -- WHN 2001-06-05)
46     (t
47      #+sb-eval
48      (if (typep fun 'sb-eval::interpreted-function)
49          (sb-eval::interpreted-function-lambda-list fun)
50          :unknown)
51      #-sb-eval
52      :unknown)))
53
54 (defun zoop (zeep &key beep)
55   blurp)
56 (assert (equal (get-arglist #'zoop) '(zeep &key beep)))
57
58 ;;; Check some predefined functions too.
59 ;;;
60 ;;; (We don't know exactly what the arguments are, e.g. the first
61 ;;; argument of PRINT might be SB-IMPL::OBJECT or SB-KERNEL::OBJ or
62 ;;; whatever. But we do know the general structure that a correct
63 ;;; answer should have, so we can safely do a lot of checks.)
64 (with-test (:name :predefined-functions-1)
65   (destructuring-bind (object-sym &optional-sym stream-sym) (get-arglist #'print)
66     (assert (symbolp object-sym))
67     (assert (eql &optional-sym '&optional))
68     (assert (symbolp stream-sym))))
69 (with-test (:name :predefined-functions-2)
70   (destructuring-bind (dest-sym control-sym &rest-sym format-args-sym)
71       (get-arglist #'format)
72     (assert (symbolp dest-sym))
73     (assert (symbolp control-sym))
74     (assert (eql &rest-sym '&rest))
75     (assert (symbolp format-args-sym))))
76
77 ;;; Check for backtraces generally being correct.  Ensure that the
78 ;;; actual backtrace finishes (doesn't signal any errors on its own),
79 ;;; and that it contains the frames we expect, doesn't contain any
80 ;;; "bogus stack frame"s, and contains the appropriate toplevel call
81 ;;; and hasn't been cut off anywhere.
82 (defun verify-backtrace (test-function frame-specs &key (allow-stunted nil))
83   (labels ((args-equal (want real)
84              (cond ((eq '&rest (car want))
85                     t)
86                    ((endp want)
87                     (endp real))
88                    ((or (eq '? (car want)) (equal (car want) (car real)))
89                     (args-equal (cdr want) (cdr real)))
90                    (t
91                     nil))))
92     (let ((result nil))
93       (block outer-handler
94         (handler-bind
95             ((error (lambda (condition)
96                       ;; find the part of the backtrace we're interested in
97                       (let* ((full-backtrace (sb-debug:backtrace-as-list))
98                              (backtrace (member (caar frame-specs) full-backtrace
99                                                 :key #'car
100                                                 :test #'equal)))
101
102                         (setf result condition)
103
104                         (unless backtrace
105                           (format t "~&//~S not in backtrace:~%   ~S~%"
106                                   (caar frame-specs)
107                                   full-backtrace)
108                           (setf result nil))
109                         ;; check that we have all the frames we wanted
110                         (mapcar
111                          (lambda (spec frame)
112                            (unless (or (not spec)
113                                        (and (equal (car spec) (car frame))
114                                             (args-equal (cdr spec)
115                                                         (cdr frame))))
116                              (print (list :wanted spec :got frame))
117                              (setf result nil)))
118                          frame-specs
119                          backtrace)
120
121                         ;; Make sure the backtrace isn't stunted in
122                         ;; any way.  (Depends on running in the main
123                         ;; thread.) FIXME: On Windows we get two
124                         ;; extra foreign frames below regular frames.
125                         (unless (find '(sb-impl::toplevel-init) backtrace
126                                       :test #'equal)
127                           (print (list :backtrace-stunted backtrace))
128                           (setf result nil))
129                         (return-from outer-handler)))))
130           (funcall test-function)))
131       result)))
132
133 (defvar *undefined-function-frame*
134   ;; bug 353
135   '(#+(or x86 x86-64) "bogus stack frame"
136     #-(or x86 x86-64) "undefined function"))
137
138 ;;; Test for "undefined function" (undefined_tramp) working properly.
139 ;;; Try it with and without tail call elimination, since they can have
140 ;;; different effects.  (Specifically, if undefined_tramp is incorrect
141 ;;; a stunted stack can result from the tail call variant.)
142 (flet ((optimized ()
143          (declare (optimize (speed 2) (debug 1))) ; tail call elimination
144          (#:undefined-function 42))
145        (not-optimized ()
146          (declare (optimize (speed 1) (debug 2))) ; no tail call elimination
147          (#:undefined-function 42))
148        (test (fun)
149          (declare (optimize (speed 1) (debug 2))) ; no tail call elimination
150          (funcall fun)))
151
152   (with-test (:name (:undefined-function :bug-346)
153               :fails-on '(or :alpha :ppc :sparc :mips
154                           (and :x86-64 :freebsd)))
155     (assert (verify-backtrace
156              (lambda () (test #'optimized))
157              (list *undefined-function-frame*
158                    (list '(flet test) #'optimized)))))
159
160   ;; bug 353: This test fails at least most of the time for x86/linux
161   ;; ca. 0.8.20.16. -- WHN
162   (with-test (:name (:undefined-function :bug-353)
163               ;; This used to have fewer :fails-on features pre-0.9.16.38,
164               ;; but it turns out that the bug was just being masked by
165               ;; the presence of the IR1 stepper instrumentation (and
166               ;; is thus again failing now that the instrumentation is
167               ;; no more).
168               :fails-on '(or :alpha :mips :ppc))
169     (assert (verify-backtrace
170              (lambda () (test #'not-optimized))
171              (list *undefined-function-frame*
172                    (list '(flet not-optimized))
173                    (list '(flet test) #'not-optimized))))))
174
175 (with-test (:name :backtrace-interrupted-condition-wait
176             :skipped-on '(not :sb-thread)
177                   ;; For some unfathomable reason the backtrace becomes
178                   ;; stunted on Darwin, ending at _sigtramp, when we add
179                   ;; :TIMEOUT NIL to the frame we expect. If we leave it out,
180                   ;; the backtrace is fine -- but the test fails. I can only
181                   ;; boggle right now.
182             :fails-on :darwin)
183   (let ((m (sb-thread:make-mutex))
184         (q (sb-thread:make-waitqueue)))
185     (assert (verify-backtrace
186             (lambda ()
187               (sb-thread:with-mutex (m)
188                 (handler-bind ((timeout (lambda (c)
189                                           (error "foo"))))
190                   (with-timeout 0.1
191                     (sb-thread:condition-wait q m)))))
192             `((sb-thread:condition-wait ,q ,m :timeout nil))))))
193
194 ;;; Division by zero was a common error on PPC. It depended on the
195 ;;; return function either being before INTEGER-/-INTEGER in memory,
196 ;;; or more than MOST-POSITIVE-FIXNUM bytes ahead. It also depends on
197 ;;; INTEGER-/-INTEGER calling SIGNED-TRUNCATE. I believe Raymond Toy
198 ;;; says that the Sparc backend (at least for CMUCL) inlines this, so
199 ;;; if SBCL does the same this test is probably not good for the
200 ;;; Sparc.
201 ;;;
202 ;;; Disabling tail call elimination on this will probably ensure that
203 ;;; the return value (to the flet or the enclosing top level form) is
204 ;;; more than MOST-POSITIVE-FIXNUM with the current spaces on OS X.
205 ;;; Enabling it might catch other problems, so do it anyway.
206 (flet ((optimized ()
207          (declare (optimize (speed 2) (debug 1))) ; tail call elimination
208          (/ 42 0))
209        (not-optimized ()
210          (declare (optimize (speed 1) (debug 2))) ; no tail call elimination
211          (/ 42 0))
212        (test (fun)
213          (declare (optimize (speed 1) (debug 2))) ; no tail call elimination
214          (funcall fun)))
215   (with-test (:name (:divide-by-zero :bug-346)
216               :fails-on :alpha)  ; bug 346
217     (assert (verify-backtrace (lambda () (test #'optimized))
218                               (list '(/ 42 &rest)
219                                     (list '(flet test) #'optimized)))))
220   (with-test (:name (:divide-by-zero :bug-356)
221               :fails-on :alpha)  ; bug 356
222     (assert (verify-backtrace (lambda () (test #'not-optimized))
223                               (list '(/ 42 &rest)
224                                     '((flet not-optimized))
225                                     (list '(flet test) #'not-optimized))))))
226
227 (with-test (:name (:throw :no-such-tag)
228             :fails-on '(or
229                         (and :sparc :linux)
230                         :alpha
231                         :mips))
232   (progn
233     (defun throw-test ()
234       (throw 'no-such-tag t))
235     (assert (verify-backtrace #'throw-test '((throw-test))))))
236
237 ;;; test entry point handling in backtraces
238
239 (defun oops ()
240   (error "oops"))
241
242 (defmacro defbt (n ll &body body)
243   `(progn
244      ;; normal debug info
245      (defun ,(intern (format nil "BT.~A.1" n)) ,ll
246        ,@body)
247      ;; no arguments saved
248      (defun ,(intern (format nil "BT.~A.2" n)) ,ll
249        (declare (optimize (debug 1) (speed 3)))
250        ,@body)
251      ;; no lambda-list saved
252      (defun ,(intern (format nil "BT.~A.3" n)) ,ll
253        (declare (optimize (debug 0)))
254        ,@body)))
255
256 (defbt 1 (&key key)
257   (list key))
258
259 (defbt 2 (x)
260   (list x))
261
262 (defbt 3 (&key (key (oops)))
263   (list key))
264
265 ;;; ERROR instead of OOPS so that tail call elimination doesn't happen
266 (defbt 4 (&optional opt)
267   (list (error "error")))
268
269 (defbt 5 (&optional (opt (oops)))
270   (list opt))
271
272 (defmacro with-details (bool &body body)
273   `(let ((sb-debug:*show-entry-point-details* ,bool))
274      ,@body))
275
276 (defun bug-354 (x)
277   (error "XEPs in backtraces: ~S" x))
278
279 (with-test (:name :bug-354)
280   (with-details t
281     (assert (not (verify-backtrace (lambda () (bug-354 354))
282                                    '((bug-354 &rest)
283                                      ((sb-c::tl-xep bug-354) &rest))))))
284   (assert (verify-backtrace (lambda () (bug-354 354)) '((bug-354 354)))))
285
286 ;;; FIXME: This test really should be broken into smaller pieces
287 (with-test (:name (:backtrace :tl-xep))
288   (with-details t
289     (assert (verify-backtrace #'namestring
290                               '(((sb-c::tl-xep namestring) 0 ?)))))
291   (with-details nil
292     (assert (verify-backtrace #'namestring
293                               '((namestring))))))
294
295 (with-test (:name (:backtrace :more-processor))
296   (with-details t
297     (assert (verify-backtrace (lambda () (bt.1.1 :key))
298                               '(((sb-c::&more-processor bt.1.1) &rest))))
299     (assert (verify-backtrace (lambda () (bt.1.2 :key))
300                               '(((sb-c::&more-processor bt.1.2) &rest))))
301     (assert (verify-backtrace (lambda () (bt.1.3 :key))
302                               '(((sb-c::&more-processor bt.1.3) &rest)))))
303   (with-details nil
304     (assert (verify-backtrace (lambda () (bt.1.1 :key))
305                               '((bt.1.1 :key))))
306     (assert (verify-backtrace (lambda () (bt.1.2 :key))
307                               '((bt.1.2 &rest))))
308     (assert (verify-backtrace (lambda () (bt.1.3 :key))
309                               '((bt.1.3 &rest))))))
310
311 (with-test (:name (:backtrace :xep))
312   (with-details t
313     (assert (verify-backtrace #'bt.2.1
314                               '(((sb-c::xep bt.2.1) 0 ?))))
315     (assert (verify-backtrace #'bt.2.2
316                               '(((sb-c::xep bt.2.2) &rest))))
317     (assert (verify-backtrace #'bt.2.3
318                               '(((sb-c::xep bt.2.3) &rest)))))
319   (with-details nil
320     (assert (verify-backtrace #'bt.2.1
321                               '((bt.2.1))))
322     (assert (verify-backtrace #'bt.2.2
323                               '((bt.2.2 &rest))))
324     (assert (verify-backtrace #'bt.2.3
325                               '((bt.2.3 &rest))))))
326
327 (with-test (:name (:backtrace :varargs-entry))
328   (with-details t
329     (assert (verify-backtrace #'bt.3.1
330                               '(((sb-c::varargs-entry bt.3.1) :key nil))))
331     (assert (verify-backtrace #'bt.3.2
332                               '(((sb-c::varargs-entry bt.3.2) :key ?))))
333     (assert (verify-backtrace #'bt.3.3
334                               '(((sb-c::varargs-entry bt.3.3) &rest)))))
335   (with-details nil
336     (assert (verify-backtrace #'bt.3.1
337                               '((bt.3.1 :key nil))))
338     (assert (verify-backtrace #'bt.3.2
339                               '((bt.3.2 :key ?))))
340     (assert (verify-backtrace #'bt.3.3
341                               '((bt.3.3 &rest))))))
342
343 (with-test (:name (:backtrace :hairy-args-processor))
344   (with-details t
345     (assert (verify-backtrace #'bt.4.1
346                               '(((sb-c::hairy-arg-processor bt.4.1) ?))))
347     (assert (verify-backtrace #'bt.4.2
348                               '(((sb-c::hairy-arg-processor bt.4.2) ?))))
349     (assert (verify-backtrace #'bt.4.3
350                               '(((sb-c::hairy-arg-processor bt.4.3) &rest)))))
351   (with-details nil
352     (assert (verify-backtrace #'bt.4.1
353                               '((bt.4.1 ?))))
354     (assert (verify-backtrace #'bt.4.2
355                               '((bt.4.2 ?))))
356     (assert (verify-backtrace #'bt.4.3
357                               '((bt.4.3 &rest))))))
358
359
360 (with-test (:name (:backtrace :optional-processor))
361   (with-details t
362     (assert (verify-backtrace #'bt.5.1
363                               '(((sb-c::&optional-processor bt.5.1)))))
364     (assert (verify-backtrace #'bt.5.2
365                               '(((sb-c::&optional-processor bt.5.2) &rest))))
366     (assert (verify-backtrace #'bt.5.3
367                               '(((sb-c::&optional-processor bt.5.3) &rest)))))
368   (with-details nil
369     (assert (verify-backtrace #'bt.5.1
370                               '((bt.5.1))))
371     (assert (verify-backtrace #'bt.5.2
372                               '((bt.5.2 &rest))))
373     (assert (verify-backtrace #'bt.5.3
374                               '((bt.5.3 &rest))))))
375
376 (write-line "//compile nil")
377 (defvar *compile-nil-error* (compile nil '(lambda (x) (cons (when x (error "oops")) nil))))
378 (defvar *compile-nil-non-tc* (compile nil '(lambda (y) (cons (funcall *compile-nil-error* y) nil))))
379 (with-test (:name (:compile nil))
380   (assert (verify-backtrace (lambda () (funcall *compile-nil-non-tc* 13))
381                             '(((lambda (x)) 13)
382                               ((lambda (y)) 13)))))
383
384 (with-test (:name :clos-slot-typecheckfun-named)
385   (assert
386    (verify-backtrace
387     (lambda ()
388       (eval `(locally (declare (optimize safety))
389                (defclass clos-typecheck-test ()
390                  ((slot :type fixnum)))
391                (setf (slot-value (make-instance 'clos-typecheck-test) 'slot) t))))
392     '(((sb-pcl::slot-typecheck fixnum) t)))))
393
394 (with-test (:name :clos-emf-named)
395   (assert
396    (verify-backtrace
397     (lambda ()
398       (eval `(progn
399                (defmethod clos-emf-named-test ((x symbol)) x)
400                (defmethod clos-emf-named-test :before (x) (assert x))
401                (clos-emf-named-test nil))))
402     '(((sb-pcl::emf clos-emf-named-test) ? ? nil)))))
403
404 (with-test (:name :bug-310173)
405   (flet ((make-fun (n)
406            (let* ((names '(a b))
407                   (req (loop repeat n collect (pop names))))
408              (compile nil
409                       `(lambda (,@req &rest rest)
410                          (let ((* *)) ; no tail-call
411                            (apply '/ ,@req rest)))))))
412     (assert
413      (verify-backtrace (lambda ()
414                          (funcall (make-fun 0) 10 11 0))
415                        '((sb-kernel:two-arg-/ 10/11 0)
416                          (/ 10 11 0)
417                          ((lambda (&rest rest)) 10 11 0))))
418     (assert
419      (verify-backtrace (lambda ()
420                          (funcall (make-fun 1) 10 11 0))
421                        '((sb-kernel:two-arg-/ 10/11 0)
422                          (/ 10 11 0)
423                          ((lambda (a &rest rest)) 10 11 0))))
424     (assert
425      (verify-backtrace (lambda ()
426                          (funcall (make-fun 2) 10 11 0))
427                        '((sb-kernel:two-arg-/ 10/11 0)
428                          (/ 10 11 0)
429                          ((lambda (a b &rest rest)) 10 11 0))))))
430
431 ;;;; test TRACE
432
433 (defun trace-this ()
434   'ok)
435
436 (defun trace-fact (n)
437   (if (zerop n)
438       1
439       (* n (trace-fact (1- n)))))
440
441 (with-test (:name (trace :simple))
442   (let ((out (with-output-to-string (*trace-output*)
443                (trace trace-this)
444                (assert (eq 'ok (trace-this)))
445                (untrace))))
446     (assert (search "TRACE-THIS" out))
447     (assert (search "returned OK" out))))
448
449 ;;; bug 379
450 ;;; This is not a WITH-TEST :FAILS-ON PPC DARWIN since there are
451 ;;; suspicions that the breakpoint trace might corrupt the whole image
452 ;;; on that platform.
453 (with-test (:name (trace :encapsulate nil)
454             :fails-on '(or (and :ppc (not :linux)) :sparc :mips)
455             :broken-on '(or :darwin :sunos))
456   (let ((out (with-output-to-string (*trace-output*)
457                (trace trace-this :encapsulate nil)
458                (assert (eq 'ok (trace-this)))
459                (untrace))))
460     (assert (search "TRACE-THIS" out))
461     (assert (search "returned OK" out))))
462
463 (with-test (:name (trace-recursive :encapsulate nil)
464             :fails-on '(or (and :ppc (not :linux)) :sparc :mips :sunos)
465             :broken-on '(or :darwin (and :x86 :sunos)))
466   (let ((out (with-output-to-string (*trace-output*)
467                (trace trace-fact :encapsulate nil)
468                (assert (= 120 (trace-fact 5)))
469                (untrace))))
470     (assert (search "TRACE-FACT" out))
471     (assert (search "returned 1" out))
472     (assert (search "returned 120" out))))
473
474 (defun trace-and-fmakunbound-this (x)
475   x)
476
477 (with-test (:name :bug-667657)
478   (trace trace-and-fmakunbound-this)
479   (fmakunbound 'trace-and-fmakunbound-this)
480   (untrace)
481   (assert (not (trace))))
482
483 (with-test (:name :bug-414)
484   (handler-bind ((warning #'error))
485     (load (compile-file "bug-414.lisp"))
486     (disassemble 'bug-414)))
487
488 (with-test (:name :bug-310175 :fails-on '(not :stack-allocatable-lists))
489   ;; KLUDGE: Not all DX-enabled platforms DX CONS, and the compiler
490   ;; transforms two-arg-LIST* (and one-arg-LIST) to CONS.  Therefore,
491   ;; use two-arg-LIST, which should get through to VOP LIST, and thus
492   ;; stack-allocate on a predictable set of machines.
493   (let ((dx-arg (list t t)))
494     (declare (dynamic-extent dx-arg))
495     (flet ((dx-arg-backtrace (x)
496              (declare (optimize (debug 2)))
497              (prog1 (sb-debug:backtrace-as-list 10)
498                (assert (sb-debug::stack-allocated-p x)))))
499       (declare (notinline dx-arg-backtrace))
500       (assert (member-if (lambda (frame)
501                            (and (consp frame)
502                                 (equal '(flet dx-arg-backtrace) (car frame))
503                                 (notany #'sb-debug::stack-allocated-p (cdr frame))))
504                          (dx-arg-backtrace dx-arg))))))
505
506 (with-test (:name :bug-795245)
507   (assert
508    (eq :ok
509        (catch 'done
510          (handler-bind
511              ((error (lambda (e)
512                        (declare (ignore e))
513                        (handler-case
514                            (sb-debug:backtrace 100 (make-broadcast-stream))
515                          (error ()
516                            (throw 'done :error))
517                          (:no-error ()
518                            (throw 'done :ok))))))
519            (apply '/= nil 1 2 nil))))))
520
521 ;;;; test infinite error protection
522
523 (defmacro nest-errors (n-levels error-form)
524   (if (< 0 n-levels)
525       `(handler-bind ((error (lambda (condition)
526                                (declare (ignore condition))
527                                ,error-form)))
528         (nest-errors ,(1- n-levels) ,error-form))
529       error-form))
530
531 (defun erroring-debugger-hook (condition old-debugger-hook)
532   (let ((*debugger-hook* old-debugger-hook))
533     (format t "recursive condition: ~A~%" condition) (force-output)
534     (error "recursive condition: ~A" condition)))
535
536 (defun test-inifinite-error-protection ()
537   ;; after 50 successful throws to SB-IMPL::TOPLEVEL-CATCHER sbcl used
538   ;; to halt, it produces so much garbage that's hard to suppress that
539   ;; it is tested only once
540   (write-line "--HARMLESS BUT ALARMING BACKTRACE COMING UP--")
541   (let ((*debugger-hook* #'erroring-debugger-hook))
542     (loop repeat 1 do
543           (let ((error-counter 0)
544                 (*terminal-io* (make-broadcast-stream)))
545             (assert
546              (not (eq
547                    :normal-exit
548                    (catch 'sb-impl::toplevel-catcher
549                      (nest-errors 20 (error "infinite error ~s"
550                                             (incf error-counter)))
551                      :normal-exit)))))))
552   (write-line "--END OF H-B-A-B--"))
553
554 (with-test (:name infinite-error-protection)
555   (enable-debugger)
556   (test-inifinite-error-protection))
557
558 (with-test (:name (infinite-error-protection :thread)
559                   :skipped-on '(not :sb-thread))
560   (enable-debugger)
561   (let ((thread (sb-thread:make-thread #'test-inifinite-error-protection)))
562     (loop while (sb-thread:thread-alive-p thread))))
563
564 ;; unconditional, in case either previous left it enabled
565 (disable-debugger)
566 \f
567 ;;;; test some limitations of MAKE-LISP-OBJ
568
569 ;;; Older GENCGC systems had a bug in the pointer validation used by
570 ;;; MAKE-LISP-OBJ that made SIMPLE-FUN objects always fail to
571 ;;; validate.
572 (with-test (:name (make-lisp-obj :simple-funs))
573   (sb-sys:without-gcing
574     (assert (eq #'identity
575                 (sb-kernel:make-lisp-obj
576                  (sb-kernel:get-lisp-obj-address
577                   #'identity))))))
578
579 (write-line "/debug.impure.lisp done")