X-Loop: help-debbugs@HIDDEN Subject: bug#24321: Guardian fails to protect procedure properties Resent-From: Robin Templeton <robin@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-guile@HIDDEN Resent-Date: Sat, 27 Aug 2016 19:33:02 +0000 Resent-Message-ID: <handler.24321.B.147232636832171 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 24321 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 24321 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-guile@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.147232636832171 (code B ref -1); Sat, 27 Aug 2016 19:33:02 +0000 Received: (at submit) by debbugs.gnu.org; 27 Aug 2016 19:32:48 +0000 Received: from localhost ([127.0.0.1]:42221 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1bdjLU-0008Mp-L0 for submit <at> debbugs.gnu.org; Sat, 27 Aug 2016 15:32:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34969) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <guile-bugs@HIDDEN>) id 1bdjLS-0008Mc-JP for submit <at> debbugs.gnu.org; Sat, 27 Aug 2016 15:32:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <guile-bugs@HIDDEN>) id 1bdjLM-0004JS-Jg for submit <at> debbugs.gnu.org; Sat, 27 Aug 2016 15:32:41 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:59372) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <guile-bugs@HIDDEN>) id 1bdjLM-0004IS-HD for submit <at> debbugs.gnu.org; Sat, 27 Aug 2016 15:32:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <guile-bugs@HIDDEN>) id 1bdjLK-00064r-BT for bug-guile@HIDDEN; Sat, 27 Aug 2016 15:32:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <guile-bugs@HIDDEN>) id 1bdjLG-0004Hr-73 for bug-guile@HIDDEN; Sat, 27 Aug 2016 15:32:37 -0400 Received: from [195.159.176.226] (port=47092 helo=blaine.gmane.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <guile-bugs@HIDDEN>) id 1bdjLG-0004Ge-0i for bug-guile@HIDDEN; Sat, 27 Aug 2016 15:32:34 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from <guile-bugs@HIDDEN>) id 1bdjL9-000378-Vh for bug-guile@HIDDEN; Sat, 27 Aug 2016 21:32:27 +0200 X-Injected-Via-Gmane: http://gmane.org/ From: Robin Templeton <robin@HIDDEN> Date: Sat, 27 Aug 2016 15:32:20 -0400 Lines: 24 Message-ID: <87shtqt3cr.fsf@HIDDEN> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@HIDDEN User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:3pupTgNUfyrPnDWyn5YGh7u1PRE= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -5.0 (-----) The following expression produces possibly erroneous results in Guile 2.1.3.104-8f2f8 (with Debian's libgc1c2 version 1:7.4.2-8): (let ((guardian (make-guardian)) (foo (eval '(lambda () #f) (interaction-environment)))) (set-procedure-property! foo 'wibbly 'wobbly) (guardian foo) (format #t "~S~%" (procedure-properties foo)) (set! foo #f) (gc) (do ((foo (guardian) (guardian))) ((not foo)) (format #t "~S~%" (procedure-properties foo)))) First it prints "((wibbly . wobbly))" as expected, but after the procedure is retrieved from the guardian the list of properties is empty. The properties are stored in a weak hash table, but shouldn't they be protected from GC while the procedure is in the guardian? -- Inteligenta persono lernas la lingvon Esperanton rapide kaj facile. Esperanto estas moderna, kultura lingvo por la mondo. Simpla, fleksebla, belsona, Esperanto estas la praktika solvo de la problemo de universala interkompreno. Lernu la interlingvon Esperanton!
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Robin Templeton <robin@HIDDEN> Subject: bug#24321: Acknowledgement (Guardian fails to protect procedure properties) Message-ID: <handler.24321.B.147232636832171.ack <at> debbugs.gnu.org> References: <87shtqt3cr.fsf@HIDDEN> X-Gnu-PR-Message: ack 24321 X-Gnu-PR-Package: guile Reply-To: 24321 <at> debbugs.gnu.org Date: Sat, 27 Aug 2016 19:33:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-guile@HIDDEN If you wish to submit further information on this problem, please send it to 24321 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 24321: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D24321 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#24321: Guardian fails to protect procedure properties Resent-From: Andy Wingo <wingo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-guile@HIDDEN Resent-Date: Fri, 02 Sep 2016 08:12:01 +0000 Resent-Message-ID: <handler.24321.B24321.147280386926821 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 24321 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: Robin Templeton <robin@HIDDEN> Cc: 24321 <at> debbugs.gnu.org Received: via spool by 24321-submit <at> debbugs.gnu.org id=B24321.147280386926821 (code B ref 24321); Fri, 02 Sep 2016 08:12:01 +0000 Received: (at 24321) by debbugs.gnu.org; 2 Sep 2016 08:11:09 +0000 Received: from localhost ([127.0.0.1]:46945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1bfjZ3-0006yU-D1 for submit <at> debbugs.gnu.org; Fri, 02 Sep 2016 04:11:08 -0400 Received: from pb-sasl1.pobox.com ([64.147.108.66]:54779 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <wingo@HIDDEN>) id 1bfjZ0-0006yL-QD for 24321 <at> debbugs.gnu.org; Fri, 02 Sep 2016 04:11:03 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id A0BB137D7D; Fri, 2 Sep 2016 04:11:01 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=e+mS4SpMccUm3jA2hjqfetsGQqg=; b=XrsQCy eKwmzBgPCG9/a0DQtV+UrJ6qSVWeFwWtBzjqEuT1/KLmZa2Mz/3sMMPT2LDpuLyh W+goc5qiOE349rQhbcbEQGxTEH3E68TQEn4aNkbT0VzTGFOXleT9AJOqcYFE/guJ 1pbnWLwfVsZAqZf87nBrmvdDAWBfweL/FLrH4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=FvSfie/jQDDPInwPDyqNFoflIjmjZzyo dJONOY/8TVzueKaIrLQG9g8RWPIdoTs0MmgaerL+5B1CWc7aKU2uZXs3+fAsrT5q cUQFDJGa+tgcnZeKJ5JR9KDUOxdW8agtBmhJXqSa2bRgkAqc2BmHqjjQZH/kVMlg ZnfColBvoXg= Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 979F837D7C; Fri, 2 Sep 2016 04:11:01 -0400 (EDT) Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id 6425F37D78; Fri, 2 Sep 2016 04:11:00 -0400 (EDT) From: Andy Wingo <wingo@HIDDEN> References: <87shtqt3cr.fsf@HIDDEN> Date: Fri, 02 Sep 2016 10:10:53 +0200 In-Reply-To: <87shtqt3cr.fsf@HIDDEN> (Robin Templeton's message of "Sat, 27 Aug 2016 15:32:20 -0400") Message-ID: <87oa46iuwi.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: C8EADE1C-70E4-11E6-891F-CE686462E9F6-02397024!pb-sasl1.pobox.com X-Spam-Score: -1.5 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.5 (-) On Sat 27 Aug 2016 21:32, Robin Templeton <robin@HIDDEN> writes: > The following expression produces possibly erroneous results in Guile > 2.1.3.104-8f2f8 (with Debian's libgc1c2 version 1:7.4.2-8): > > (let ((guardian (make-guardian)) > (foo (eval '(lambda () #f) (interaction-environment)))) > (set-procedure-property! foo 'wibbly 'wobbly) > (guardian foo) > (format #t "~S~%" (procedure-properties foo)) > (set! foo #f) > (gc) > (do ((foo (guardian) (guardian))) > ((not foo)) > (format #t "~S~%" (procedure-properties foo)))) > > First it prints "((wibbly . wobbly))" as expected, but after the > procedure is retrieved from the guardian the list of properties is > empty. The properties are stored in a weak hash table, but shouldn't > they be protected from GC while the procedure is in the guardian? Related to https://debbugs.gnu.org/cgi/bugreport.cgi?bug=10836. Andy
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.