GNU bug report logs - #24321
Guardian fails to protect procedure properties

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guile; Reported by: Robin Templeton <robin@HIDDEN>; dated Sat, 27 Aug 2016 19:33:02 UTC; Maintainer for guile is bug-guile@HIDDEN.

Message received at 24321 <at> debbugs.gnu.org:


Received: (at 24321) by debbugs.gnu.org; 2 Sep 2016 08:11:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 02 04:11:08 2016
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>
To: Robin Templeton <robin@HIDDEN>
Subject: Re: bug#24321: Guardian fails to protect procedure properties
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-Debbugs-Envelope-To: 24321
Cc: 24321 <at> debbugs.gnu.org
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




Information forwarded to bug-guile@HIDDEN:
bug#24321; Package guile. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 27 Aug 2016 19:32:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 27 15:32:48 2016
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/
To: bug-guile@HIDDEN
From: Robin Templeton <robin@HIDDEN>
Subject: Guardian fails to protect procedure properties
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-Debbugs-Envelope-To: submit
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!





Acknowledgement sent to Robin Templeton <robin@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guile@HIDDEN. Full text available.
Report forwarded to bug-guile@HIDDEN:
bug#24321; Package guile. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.