From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.bugs Subject: bug#12095: Protecting pointer on bytevector with guardian does not protect memory Date: Mon, 08 Oct 2012 17:42:49 +0200 Message-ID: <87fw5pas1y.fsf@gnu.org> References: <20502.44997.295661.951990@vagabond.local> <878vdskmde.fsf@Kagami.home> <874nm75le8.fsf@gnu.org> <87y5ji2f1y.fsf@gnu.org> <874nm584dq.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1349711026 32087 80.91.229.3 (8 Oct 2012 15:43:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Oct 2012 15:43:46 +0000 (UTC) Cc: 12095-done@debbugs.gnu.org, Ian Price To: Daniel Hartwig Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Oct 08 17:43:52 2012 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TLFUj-0000Xe-Jd for guile-bugs@m.gmane.org; Mon, 08 Oct 2012 17:43:49 +0200 Original-Received: from localhost ([::1]:52560 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLFUd-0008Rc-Ig for guile-bugs@m.gmane.org; Mon, 08 Oct 2012 11:43:43 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58991) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLFUW-0008Qc-Pe for bug-guile@gnu.org; Mon, 08 Oct 2012 11:43:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLFUU-0005K9-OY for bug-guile@gnu.org; Mon, 08 Oct 2012 11:43:36 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51793) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLFUU-0005K3-KR for bug-guile@gnu.org; Mon, 08 Oct 2012 11:43:34 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TLFUw-0002UB-Du for bug-guile@gnu.org; Mon, 08 Oct 2012 11:44:02 -0400 Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-guile@gnu.org Resent-Date: Mon, 08 Oct 2012 15:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 12095 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Mail-Followup-To: 12095@debbugs.gnu.org, ludo@gnu.org Original-Received: via spool by 12095-done@debbugs.gnu.org id=D12095.13497110039499 (code D ref 12095); Mon, 08 Oct 2012 15:44:01 +0000 Original-Received: (at 12095-done) by debbugs.gnu.org; 8 Oct 2012 15:43:23 +0000 Original-Received: from localhost ([127.0.0.1]:33810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TLFUI-0002TA-Rg for submit@debbugs.gnu.org; Mon, 08 Oct 2012 11:43:23 -0400 Original-Received: from xanadu.aquilenet.fr ([88.191.123.111]:59757) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TLFUG-0002T1-7r for 12095-done@debbugs.gnu.org; Mon, 08 Oct 2012 11:43:21 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id 813BF9CBC; Mon, 8 Oct 2012 17:42:50 +0200 (CEST) Original-Received: from xanadu.aquilenet.fr ([127.0.0.1]) by localhost (xanadu.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id q03e31mvzAuI; Mon, 8 Oct 2012 17:42:50 +0200 (CEST) Original-Received: from pluto (unknown [193.50.110.215]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id 3428D2740; Mon, 8 Oct 2012 17:42:50 +0200 (CEST) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 17 =?UTF-8?Q?Vend=C3=A9miaire?= an 221 de la =?UTF-8?Q?R=C3=A9volution?= 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: (Daniel Hartwig's message of "Mon, 8 Oct 2012 22:10:54 +0800") User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:6549 Archived-At: Daniel Hartwig skribis: > On 8 October 2012 21:44, Ludovic Court=C3=A8s wrote: >>> On 8 October 2012 04:38, Ludovic Court=C3=A8s wrote: >>> Right. But then the pointer is being collected even though it remains >>> inside the guardian, in the example it is never extracted from there. >> >> Well, when the object reaches the guardian=E2=80=99s zombie list, that= =E2=80=99s because >> it=E2=80=99s been finalized, so any weak references from that object can= also be >> nullified. > > Ah. So I thought that being in the zombie list prevented any > finalization, thus when the guardian returns an object it is still > fully functional and only after the reference is lost again does it > really get finalized. Well, the object is still usable when the guardian returns it, because it=E2=80=99s been kept alive by the finalizer (=E2=80=98finalize_guarded=E2= =80=99 in guardians.c). Now, whether weak references from the object are subject to =E2=80=9Cnullification=E2=80=9D by the GC is clearly a gray area, but I=E2= =80=99m not surprised that it is. >> How does it help? Should we close the bug? :-) > > Sure. At least you seem convinced and you has actually hacked on it :-) Good. :-) So closing it now, but feel free to reopen if you think something=E2=80=99s= wrong. Thanks, Ludo=E2=80=99.