From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.user Subject: Re: smob mark functions in 2.0 Date: Fri, 25 Nov 2011 00:24:11 +0100 Message-ID: <871usxgl44.fsf@gnu.org> References: <87aa7mmt76.fsf@pobox.com> <874nxumo1m.fsf@gnu.org> <8739ddeqlm.fsf@pobox.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1322177075 14794 80.91.229.12 (24 Nov 2011 23:24:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 24 Nov 2011 23:24:35 +0000 (UTC) Cc: guile-user@gnu.org To: Andy Wingo Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Nov 25 00:24:28 2011 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RTiea-0007ot-FW for guile-user@m.gmane.org; Fri, 25 Nov 2011 00:24:28 +0100 Original-Received: from localhost ([::1]:50117 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTiea-0004uC-0o for guile-user@m.gmane.org; Thu, 24 Nov 2011 18:24:28 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:54041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTieN-0004tU-OV for guile-user@gnu.org; Thu, 24 Nov 2011 18:24:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTieM-0008DQ-7D for guile-user@gnu.org; Thu, 24 Nov 2011 18:24:15 -0500 Original-Received: from mail1-relais-roc.national.inria.fr ([192.134.164.82]:27422) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTieL-0008DC-V3 for guile-user@gnu.org; Thu, 24 Nov 2011 18:24:14 -0500 X-IronPort-AV: E=Sophos;i="4.69,568,1315173600"; d="scan'208";a="132525722" Original-Received: from reverse-83.fdn.fr (HELO pluto) ([80.67.176.83]) by mail1-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 25 Nov 2011 00:24:12 +0100 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 5 Frimaire an 220 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <8739ddeqlm.fsf@pobox.com> (Andy Wingo's message of "Thu, 24 Nov 2011 11:56:21 +0100") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.134.164.82 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:8998 Archived-At: Hi, Andy Wingo skribis: > On Thu 24 Nov 2011 00:12, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >>> So, your mark function might see freed objects. This is terrible, but >>> it is the way that it is. The key is that, if you touch a Scheme object >>> in your mark function, to first do a check on that object, to see that >>> it is valid. You can check the TC bits of the first word, or otherwise >>> check that other words are non-NULL. >> >> What about making that check in libguile before invoking the user=E2=80= =99s mark >> function? > > Yes, we do that. I think you wrote that code! Yes, when I was young. ;-) > The problem was in a mark function, accessing *other* Scheme objects. Oh, right. Anyway, users are encouraged to #ifdef out mark functions when using Guile 2.0. Thanks, Ludo=E2=80=99.