From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Han-Wen Nienhuys Newsgroups: gmane.lisp.guile.devel Subject: Re: the new gc asserts in master Date: Tue, 26 Aug 2008 23:41:11 -0300 Message-ID: References: Reply-To: hanwen@xs4all.nl NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1219805118 14372 80.91.229.12 (27 Aug 2008 02:45:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Aug 2008 02:45:18 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Aug 27 04:46:11 2008 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KYB2w-0008Dx-Ei for guile-devel@m.gmane.org; Wed, 27 Aug 2008 04:46:10 +0200 Original-Received: from localhost ([127.0.0.1]:42273 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KYB1y-0001El-9U for guile-devel@m.gmane.org; Tue, 26 Aug 2008 22:45:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KYB1w-0001Ec-4y for guile-devel@gnu.org; Tue, 26 Aug 2008 22:45:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KYB1u-0001EH-CN for guile-devel@gnu.org; Tue, 26 Aug 2008 22:45:07 -0400 Original-Received: from [199.232.76.173] (port=56120 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KYB1u-0001EE-7R for guile-devel@gnu.org; Tue, 26 Aug 2008 22:45:06 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:46139 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KYB1t-0005LQ-1b for guile-devel@gnu.org; Tue, 26 Aug 2008 22:45:05 -0400 Original-Received: from root by ciao.gmane.org with local (Exim 4.43) id 1KYB1q-00054S-Vb for guile-devel@gnu.org; Wed, 27 Aug 2008 02:45:03 +0000 Original-Received: from 201.80.3.52 ([201.80.3.52]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Aug 2008 02:45:02 +0000 Original-Received: from hanwen by 201.80.3.52 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Aug 2008 02:45:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 18 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 201.80.3.52 User-Agent: Thunderbird 2.0.0.16 (X11/20080723) In-Reply-To: X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:7510 Archived-At: Han-Wen Nienhuys escreveu: >> even the lazy smob case I wrote about here: >> >> http://thread.gmane.org/gmane.lisp.guile.user/6372 > > I would classify the use of mark bits outside of the mark phase as outside > of the defined API. If you want to have weak pointer semantics, use > a weak hashtable, or implement reference counting on the C side. > > I am actuallly inclined to add add abort() for anyone who calls scm_gc_mark() > outside the marking phase. Also, you're creating a race condition: the mark bits are not protected by a lock, so you will be screwed in still more interesting ways if more threads or types would start doing this. -- Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen