1
0
mirror of https://github.com/PDP-10/its.git synced 2026-01-21 10:13:35 +00:00
PDP-10.its/src/l/gcbib.bug

26 lines
648 B
Common Lisp

;;;-*-LISP-*-
;;; At least this bug should be documented, if not fixed.
;;; 11:53am Friday, 12 June 1981 -GJC
(SETQ GC-BUG
'(
(SETQ A (*ARRAY NIL T 1000))
(SETQ B (*ARRAY NIL T 1000))
(comment For keeping a non-marked pointer to A and B)
(ARRAY K NIL 10)
(comment Give a pointer to itself)
(STORE (ARRAYCALL T A 0) A)
(comment Stash the arrays for the experiment)
(STORE (K 0) A)
(STORE (K 1) B)
(SETQ A NIL)
(SETQ B NIL)))
(DEFUN GC-BUG ()
(MAPC 'EVAL GC-BUG)
(comment The GC should reclaim both arrays)
(comment But look at the contents of k)
(comment (K 1) is reclaimed but (K 0) is not)
(GC)
(LIST (K 0) (K 1)))