From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.devel Subject: Re: scm_gc_unprotect during GC Date: Tue, 21 Sep 2004 23:23:54 +0200 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87k6untixh.fsf@zagadka.ping.de> References: <16706.21406.130861.89431@byrd.xs4all.nl> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1095801893 6390 80.91.229.6 (21 Sep 2004 21:24:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 21 Sep 2004 21:24:53 +0000 (UTC) Cc: jantien@xs4all.nl, guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Sep 21 23:24:34 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C9s7l-0007Qv-00 for ; Tue, 21 Sep 2004 23:24:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C9sDg-0000JU-Sg for guile-devel@m.gmane.org; Tue, 21 Sep 2004 17:30:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C9sDT-0000Ic-3c for guile-devel@gnu.org; Tue, 21 Sep 2004 17:30:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C9sDS-0000IJ-Ft for guile-devel@gnu.org; Tue, 21 Sep 2004 17:30:26 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C9sDS-0000IG-Co for guile-devel@gnu.org; Tue, 21 Sep 2004 17:30:26 -0400 Original-Received: from [195.253.8.218] (helo=mail.dokom.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C9s7A-0007IO-Fk for guile-devel@gnu.org; Tue, 21 Sep 2004 17:23:56 -0400 Original-Received: from [195.138.42.212] (helo=zagadka.ping.de) by mail.dokom.net with smtp (Exim 4.34) id 1C9s78-0001zH-Vi for guile-devel@gnu.org; Tue, 21 Sep 2004 23:23:55 +0200 Original-Received: (qmail 32207 invoked by uid 1000); 21 Sep 2004 21:23:54 -0000 Original-To: hanwen@xs4all.nl In-Reply-To: <16706.21406.130861.89431@byrd.xs4all.nl> (Han-Wen Nienhuys's message of "Sat, 11 Sep 2004 03:23:42 +0200") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:4134 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:4134 Han-Wen Nienhuys writes: > A short term solution is to make sure that LilyPond never does > scm_gc_unprotect_object() from smobbed destructor. However, I feel > that this is a kludge. > > Either scm_gc_unprotect_object is callable during sweep, or this is > forbidden. At present, GUILE does not print a warning, but barfs in an > unrelated location. Yes, that's unfortunate. Almost anything is forbidden during sweep, and we need to document that more clearly. I'd say that a smob free function should not call scm_gc_unprotect_object, or any other function that accesses the heap. The heap might be in an inconsistent state, etc. We probably should list all functions that are callable, starting with just scm_gc_free. Why do you need to call scm_gc_unprotect_object from your smob free function? To release a SCM value that was in use by the smob? The usual way to do that is to mark that value in the smob mark function. -- GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel