From 0a9a6d142269d54b572d19fb958309be2b5b8818 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 15 Sep 2009 22:31:45 +0200 Subject: [PATCH] "Document" the `set-module-eval-closure!' weak hash table glitch. * module/ice-9/boot-9.scm (set-module-eval-closure!): Add link to an explanation. * test-suite/tests/gc.test ("gc")["Unused modules are removed"]: Increase the `cleanup' loop. --- module/ice-9/boot-9.scm | 1 + test-suite/tests/gc.test | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index e6824b991..b1bc3c929 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -1422,6 +1422,7 @@ ;; XXX: The following line introduces a circular reference that ;; precludes garbage collection of modules with the current weak hash ;; table semantics (see + ;; http://lists.gnu.org/archive/html/guile-devel/2009-01/msg00102.html and ;; http://thread.gmane.org/gmane.comp.programming.garbage-collection.boehmgc/2465 ;; for details). Since it doesn't appear to be used (only in ;; `scm_lookup_closure_module ()', which has 1 caller), we just comment diff --git a/test-suite/tests/gc.test b/test-suite/tests/gc.test index 063dad6d1..cf252ce9e 100644 --- a/test-suite/tests/gc.test +++ b/test-suite/tests/gc.test @@ -1,5 +1,5 @@ ;;;; gc.test --- test guile's garbage collection -*- scheme -*- -;;;; Copyright (C) 2000, 2001, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. +;;;; Copyright (C) 2000, 2001, 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ;;;; ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public @@ -68,7 +68,7 @@ ;; don't leave a reference to one of the modules we created. It ;; proved to be useful on SPARC: ;; http://lists.gnu.org/archive/html/guile-devel/2008-02/msg00006.html . - (let cleanup ((i 10)) + (let cleanup ((i 20)) (and (> i 0) (begin (cleanup (1- i)) i))) -- 2.20.1