From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 28 16:46:45 2011 Received: (at submit) by debbugs.gnu.org; 28 Oct 2011 20:46:45 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RJtK8-0002IU-NG for submit@debbugs.gnu.org; Fri, 28 Oct 2011 16:46:44 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RJtK4-0002IM-VC for submit@debbugs.gnu.org; Fri, 28 Oct 2011 16:46:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RJtIB-00076H-Oj for submit@debbugs.gnu.org; Fri, 28 Oct 2011 16:44:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:58080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJtIB-00076D-Jg for submit@debbugs.gnu.org; Fri, 28 Oct 2011 16:44:43 -0400 Received: from eggs.gnu.org ([140.186.70.92]:39154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJtIA-0005gY-Fa for bug-guile@gnu.org; Fri, 28 Oct 2011 16:44:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RJtI9-00075r-DC for bug-guile@gnu.org; Fri, 28 Oct 2011 16:44:42 -0400 Received: from lo.gmane.org ([80.91.229.12]:49945) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJtI9-00075Z-7v for bug-guile@gnu.org; Fri, 28 Oct 2011 16:44:41 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RJtI7-0007Hg-E1 for bug-guile@gnu.org; Fri, 28 Oct 2011 22:44:39 +0200 Received: from host31-53-23-37.range31-53.btcentralplus.com ([31.53.23.37]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 28 Oct 2011 22:44:39 +0200 Received: from ianprice90 by host31-53-23-37.range31-53.btcentralplus.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 28 Oct 2011 22:44:39 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-guile@gnu.org From: Ian Price Subject: Using a guardian on a value in a weak hash Date: Fri, 28 Oct 2011 21:42:45 +0100 Lines: 45 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: host31-53-23-37.range31-53.btcentralplus.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:MKjpQLbFdHsgCIavw1aC+C5Jsxs= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) Hi guilers, If I 'guard' a value, and store it in a weak-key hashtable, then it doesn't appear in the guardian even after it is removed from the weak-hash by a garbage collection. Note, this only happens in a _script_, and will work fine in a REPL (you should only need two GCs, one for the weak hash, and one for the now free value). e.g. (define guardian (make-guardian)) (define finalizer-table (make-weak-key-hash-table)) (let ((f (lambda () (display "test\n")))) (guardian f) (hashq-set! finalizer-table (cons #f #f) f) #f) (write finalizer-table) (newline) (gc)(gc)(gc)(gc)(gc)(gc)(gc)(gc)(gc)(gc)(gc)(gc) (write finalizer-table) (newline) (write (guardian)) (newline) will produce the output [ian@Kagami guile]$ guile -s /tmp/gcbug.scm # # #f [ian@Kagami guile]$ -- Ian Price "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled" From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 29 13:44:19 2011 Received: (at 9900) by debbugs.gnu.org; 29 Oct 2011 17:44:19 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKCx8-0005C4-LZ for submit@debbugs.gnu.org; Sat, 29 Oct 2011 13:44:19 -0400 Received: from mail-iy0-f172.google.com ([209.85.210.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKCx5-0005Bv-Jf for 9900@debbugs.gnu.org; Sat, 29 Oct 2011 13:44:16 -0400 Received: by iabn5 with SMTP id n5so5321850iab.3 for <9900@debbugs.gnu.org>; Sat, 29 Oct 2011 10:42:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=1FH0cXAIJYbGkhWFvYmelwd3HNDB9DSnsGLELBPIZL8=; b=bIM1xi7rVwa2xd5qrRHE6XRlocVcGSNBMoX8B/CFPBUsmL7RkRItBLLpwARdZ4FNoy xZixUTElwkTeKfH6HTE6tER3vVLxDOYjqIi3pEZ9cLsGaKYs6SFDK68P8NixLXwmzeXx ivQ+jt5cimiMhH+p6PpKETsdFQ1Y38x70stWA= MIME-Version: 1.0 Received: by 10.231.5.73 with SMTP id 9mr2616541ibu.60.1319910133797; Sat, 29 Oct 2011 10:42:13 -0700 (PDT) Received: by 10.231.119.100 with HTTP; Sat, 29 Oct 2011 10:42:13 -0700 (PDT) In-Reply-To: References: Date: Sat, 29 Oct 2011 19:42:13 +0200 Message-ID: Subject: Re: bug#9900: Using a guardian on a value in a weak hash From: Stefan Israelsson Tampe To: 9900@debbugs.gnu.org Content-Type: multipart/alternative; boundary=00151773db12a9149404b073867a X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 9900 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) --00151773db12a9149404b073867a Content-Type: text/plain; charset=ISO-8859-1 f below in the code is referencing a direct function and not a closure that is not gc:able it seams although there is no references to it. It looks like the loaded file references that code and it will not be gc:ed until the same file is loaded again (make sure to save the old guardian so that one can inspect) The weak key hastable is wrongly used and swaping key and value gives correct behavior Regards Stefan On Fri, Oct 28, 2011 at 10:42 PM, Ian Price wrote: > > Hi guilers, > > If I 'guard' a value, and store it in a weak-key hashtable, then it > doesn't appear in the guardian even after it is removed from the > weak-hash by a garbage collection. Note, this only happens in a > _script_, and will work fine in a REPL (you should only need two GCs, > one for the weak hash, and one for the now free value). > e.g. > > > (define guardian (make-guardian)) > (define finalizer-table (make-weak-key-hash-table)) > > (let ((f (lambda () (display "test\n")))) > (guardian f) > (hashq-set! finalizer-table (cons #f #f) f) > #f) > > (write finalizer-table) > (newline) > > (gc)(gc)(gc)(gc)(gc)(gc)(gc)(gc)(gc)(gc)(gc)(gc) > > (write finalizer-table) > (newline) > > (write (guardian)) > (newline) > > > will produce the output > > > [ian@Kagami guile]$ guile -s /tmp/gcbug.scm > # > # > #f > [ian@Kagami guile]$ > > -- > Ian Price > > "Programming is like pinball. The reward for doing it well is > the opportunity to do it again" - from "The Wizardy Compiled" > > > > > --00151773db12a9149404b073867a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable f below in the code is referencing a direct function and not a closure that= is not gc:able it seams
although there is no references to it. It looks= like the loaded file references that code and it will not be
gc:ed unti= l the same file is loaded again (make sure to save the old guardian so that= one can inspect)
The weak key hastable is wrongly used and swaping key and value gives corre= ct behavior

Regards
Stefan

On F= ri, Oct 28, 2011 at 10:42 PM, Ian Price <ianprice90@googlemail.com> wr= ote:

Hi guilers,

If I 'guard' a value, and store it in a weak-key hashtable, then it=
doesn't appear in the guardian even after it is removed from the
weak-hash by a garbage collection. Note, this only happens in a
_script_, and will work fine in a REPL (you should only need two GCs,
one for the weak hash, and one for the now free value).
e.g.


(define guardian (make-guardian))
(define finalizer-table (make-weak-key-hash-table))

(let ((f (lambda () (display "test\n"))))
 (guardian f)
 (hashq-set! finalizer-table (cons #f #f) f)
 #f)

(write finalizer-table)
(newline)

(gc)(gc)(gc)(gc)(gc)(gc)(gc)(gc)(gc)(gc)(gc)(gc)

(write finalizer-table)
(newline)

(write (guardian))
(newline)


will produce the output


[ian@Kagami guile]$ guile -s /tmp/gcbug.scm
#<weak−key−hash−table 1/31>
#<weak−key−hash−table 0/31>
#f
[ian@Kagami guile]$

--
Ian Price

"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"= ;





--00151773db12a9149404b073867a-- From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 29 14:55:04 2011 Received: (at 9900) by debbugs.gnu.org; 29 Oct 2011 18:55:04 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKE3c-0007YJ-6P for submit@debbugs.gnu.org; Sat, 29 Oct 2011 14:55:04 -0400 Received: from mail-wy0-f172.google.com ([74.125.82.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKE3Y-0007Xt-RP for 9900@debbugs.gnu.org; Sat, 29 Oct 2011 14:55:02 -0400 Received: by wyh22 with SMTP id 22so4666412wyh.3 for <9900@debbugs.gnu.org>; Sat, 29 Oct 2011 11:52:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=0AfedF4tX422HOlj2/Hz270Vyd0EzJiDnioskLkcUCo=; b=fO9cHZhu0A/G5sqyMm1BKmUINd+0gwM7lrcqHEFGEfOsckM6FuaSjkRgZ7gRyiayBc 3SIvYJzEdUK/5Lplz8Sm/RitL4mW9ls1OOc5n83ig5QuX5yM81PIwuAXmmTI29CsNmrC PYUcl9xuBuEA4JttIrYQSiikhYQnhLoyyL6YE= Received: by 10.227.204.135 with SMTP id fm7mr10188523wbb.2.1319914378353; Sat, 29 Oct 2011 11:52:58 -0700 (PDT) Received: from Kagami (host86-169-103-210.range86-169.btcentralplus.com. [86.169.103.210]) by mx.google.com with ESMTPS id et20sm215952wbb.15.2011.10.29.11.52.57 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 29 Oct 2011 11:52:57 -0700 (PDT) From: Ian Price To: Stefan Israelsson Tampe Subject: Re: bug#9900: Using a guardian on a value in a weak hash References: Date: Sat, 29 Oct 2011 19:51:11 +0100 In-Reply-To: (Stefan Israelsson Tampe's message of "Sat, 29 Oct 2011 19:42:13 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 9900 Cc: 9900@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) Stefan Israelsson Tampe writes: > f below in the code is referencing a direct function and not a closure th= at is not gc:able it seams > although there is no references to it. It looks like the loaded file refe= rences that code and it will not be > gc:ed until the same file is loaded again (make sure to save the old guar= dian so that one can inspect) This does seem to be the case scheme@(guile=E2=88=92user)> (load "gcbug.scm") ;;; note: source file /tmp/gcbug.scm ;;; newer than compiled /home/ian/.cache/guile/ccache/2.0=E2=88=92LE= =E2=88=924=E2=88=922.0/tmp/gcbug.scm.go ;;; note: auto=E2=88=92compilation is enabled, set GUILE_AUTO_COMPILE=3D0 ;;; or pass the =E2=88=92=E2=88=92no=E2=88=92auto=E2=88=92compile arg= ument to disable. ;;; compiling /tmp/gcbug.scm ;;; compiled /home/ian/.cache/guile/ccache/2.0=E2=88=92LE=E2=88=924=E2=88= =922.0/tmp/gcbug.scm.go # # #f scheme@(guile=E2=88=92user)> guardian $1 =3D # scheme@(guile=E2=88=92user)> (guardian) $2 =3D #f scheme@(guile=E2=88=92user)> (guardian) $3 =3D #f scheme@(guile=E2=88=92user)> (define k guardian) scheme@(guile=E2=88=92user)> (load "gcbug.scm") # # #f scheme@(guile=E2=88=92user)> (guardian) $4 =3D #f scheme@(guile=E2=88=92user)> (guardian) $5 =3D #f scheme@(guile=E2=88=92user)> (k) $6 =3D (foo . foo) scheme@(guile=E2=88=92user)> (k) $7 =3D #f scheme@(guile=E2=88=92user)>=20 here, f is the pair (foo . foo). > The weak key hastable is wrongly used and swaping key and value gives > correct behavior I disagree. While I would certainly expect it to work if I made the reference to f weak, it would miss the point of my code entirely. Namely to make sure that f isn't gc'd until after some other value is (hence the weak reference to a cons, and my comment about expecting to need 2 gcs). FWIW, I swapped it and ran again [ian@Kagami tmp]$ guile -s gcbug.scm=20 ;;; note: source file /tmp/gcbug.scm ;;; newer than compiled /home/ian/.cache/guile/ccache/2.0=E2=88=92LE= =E2=88=924=E2=88=922.0/tmp/gcbug.scm.go ;;; note: auto=E2=88=92compilation is enabled, set GUILE_AUTO_COMPILE=3D0 ;;; or pass the =E2=88=92=E2=88=92no=E2=88=92auto=E2=88=92compile arg= ument to disable. ;;; compiling /tmp/gcbug.scm ;;; compiled /home/ian/.cache/guile/ccache/2.0=E2=88=92LE=E2=88=924=E2=88= =922.0/tmp/gcbug.scm.go # # #f which isn't correct either, but not surprising if something else is holding onto f. --=20 Ian Price "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled" From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 30 09:54:57 2011 Received: (at 9900) by debbugs.gnu.org; 30 Oct 2011 13:54:58 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKVqj-0003aU-Nv for submit@debbugs.gnu.org; Sun, 30 Oct 2011 09:54:57 -0400 Received: from mail-iy0-f172.google.com ([209.85.210.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKVqg-0003aM-Hu for 9900@debbugs.gnu.org; Sun, 30 Oct 2011 09:54:55 -0400 Received: by iabn5 with SMTP id n5so6130486iab.3 for <9900@debbugs.gnu.org>; Sun, 30 Oct 2011 06:52:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=6ERGaWDObqnt8GVjkoZcTfcn5M0lQdBTf5daP7C8t64=; b=t9LkBT9RuSTLkypiieWXj26GKBjA0U6iL+JaXIqw5WsW2qRk0RE30caWPHn6vpAcoT wDWhaYAWX9dNSKh8Bmq40Urr21hWCys/YwdlMvxUAwvVEWdxD/awyl7BCzhje9Zo579W fNre8qT3wa1Ufu95URLsJr5uFXYMOabT2/0Kw= MIME-Version: 1.0 Received: by 10.42.151.4 with SMTP id c4mr15802730icw.39.1319982768036; Sun, 30 Oct 2011 06:52:48 -0700 (PDT) Received: by 10.231.119.100 with HTTP; Sun, 30 Oct 2011 06:52:48 -0700 (PDT) Date: Sun, 30 Oct 2011 14:52:48 +0100 Message-ID: Subject: local vars not cleaned From: Stefan Israelsson Tampe To: 9900@debbugs.gnu.org Content-Type: multipart/alternative; boundary=90e6ba1efd82ff9bd604b0846f12 X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 9900 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) --90e6ba1efd82ff9bd604b0846f12 Content-Type: text/plain; charset=ISO-8859-1 >> This does seem to be the case Yes. I toke a code snippet and compiled to assembly. It looks like the .go file contain a specification of a program with a set of local variables where the (cons 'foo 'foo) is stored very much like the function local vars on the stack. Now there is a link somehow to this program that is alive after it has been executed and itself links to the list of local vars. This theory can be shown by doing the same thing in a new let and say (cons 'goo 'goo) afterwards for which the old local slot is used as storage. Hence at evaluation (gauardian) will show (foo . foo) but (goo . goo) will not appear due to beeing referenced by the local var slot. Now, one solution would be to have a pass of cleaning the local slots after the execution because this behavior has the potential of leading to memory leaks. The next step is to question the use of keeping the link to the program that comes from the loaded file, maybe due to cashing this is an effective strategy, but someone with greater overview of the code has to commment on this. In alles locally defined functions and variables should not be kept in the gc because it is begging to yield memory leaks. cashing locally defined functions is a bit weaker and on first sight can be a good cashing strategy. On the other hand if one implementing schemes like Ian does one can easilly have a chain of objects that has to be gc:d is a specific order and if one of these object is a local lambda gcing of the elements further down will not happen. > I disagree. While I would certainly expect it to work if I made the > reference to f weak, it would miss the point of my code entirely. Namely > to make sure that f isn't gc'd until after some other value is (hence > the weak reference to a cons, and my comment about expecting to need 2 gcs). Sorry for may blunt statement here. You seam to come from a valid way of doing your coding. My fault. /Stefan --90e6ba1efd82ff9bd604b0846f12 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable >> This does seem to be the case

Yes. I toke a code snippet an= d compiled to assembly. It looks like the .go file contain a specification<= br>of a program with a set of local variables where the (cons 'foo '= ;foo) is stored very much like the function
local vars on the stack. Now there is a link somehow to this program that i= s alive after it has been executed
and itself links to the list of local= vars. This theory can be shown by doing the same thing in a new let
=A0and say (cons 'goo 'goo) afterwards for which the old local slot= is used as storage. Hence at evaluation
(gauardian) will show (foo . fo= o) but (goo . goo) will not appear due to beeing referenced by the local va= r slot.

Now, one solution would be to have a pass of cleaning the local slots a= fter the execution because this behavior
has the potential of leading to= memory leaks. The next step is to question the use of keeping the link to = the program
that comes from the loaded file, maybe due to cashing this is an effective = strategy, but someone with greater overview
of the code has to commment = on this. In alles locally defined functions and variables should not be kep= t in the gc because
it is begging to yield memory leaks. cashing locally defined functions is a= bit weaker and on first sight can be a good cashing strategy. On the other= hand if one implementing schemes like Ian does one can easilly have a chai= n of objects that has to be gc:d is a specific
order and if one of these object is a local lambda gcing of the elements fu= rther down will not happen.


> I disagree. While I would certa= inly expect it to work if I made the
> reference to f weak, it would miss the point of my code entirely. Name= ly
> to make sure that f isn't gc'd until after some other value is= (hence
> the weak reference to a cons, and my comment about expecting to need 2= gcs).

Sorry for may blunt statement here. You seam to come from a v= alid way of doing your coding. My fault.

/Stefan
--90e6ba1efd82ff9bd604b0846f12-- From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 30 14:52:06 2011 Received: (at 9900) by debbugs.gnu.org; 30 Oct 2011 18:52:06 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKaUI-0002mI-9D for submit@debbugs.gnu.org; Sun, 30 Oct 2011 14:52:06 -0400 Received: from mail-iy0-f172.google.com ([209.85.210.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKaUF-0002mB-Pu for 9900@debbugs.gnu.org; Sun, 30 Oct 2011 14:52:04 -0400 Received: by iabn5 with SMTP id n5so6333815iab.3 for <9900@debbugs.gnu.org>; Sun, 30 Oct 2011 11:49:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=tTlSkmthb3zjm+dxEjQhfb1fOWtQ4pE7WtVm68gdWO4=; b=pUkAG1N4F0jdOG3ENF2hub3uMYDBlU642UMtm1HdVmqkq/qzInpG1NVV3+f82yrZHI Wm9ezg0fEXso7vSIBWPVBrvTdqN59NprQATscPtmiVmJ6iAqd/vNLYx5Tev7Tq4eL0qc 4XU9bO6qTP7+CbsLTFhPzf9AfM8iJplRzKrdk= MIME-Version: 1.0 Received: by 10.231.51.4 with SMTP id b4mr3994371ibg.99.1320000596213; Sun, 30 Oct 2011 11:49:56 -0700 (PDT) Received: by 10.231.119.100 with HTTP; Sun, 30 Oct 2011 11:49:56 -0700 (PDT) In-Reply-To: References: Date: Sun, 30 Oct 2011 19:49:56 +0100 Message-ID: Subject: Re: bug#9900: local vars not cleaned From: Stefan Israelsson Tampe To: 9900@debbugs.gnu.org Content-Type: multipart/alternative; boundary=001517740ae0a3fe9404b08896b1 X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 9900 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) --001517740ae0a3fe9404b08896b1 Content-Type: text/plain; charset=ISO-8859-1 Sorry to spam the list. But beeing a little ignorant how guile works, makes this a discovering procedure. So locals is always allocated from the stack. This is what happens with Ians code. A program is executed and a set of locals is allocated on the stack for the duration of the loading, this means that during the whole execution of the loaded file the locals variables are below the stack pointer and hence always contains a reference from the stack to the last used objects in the local variables. This can be seen by loading the file and then do an explicit gc on the repl. and then check the guardian. Then because the sp pointer is now below the locals in the loaded file they can be gc:ed and is also returned by calls to the guardian. What can be done? 1. One can push the constructors into functions that are called from the toplevel in the code 2. One can patch guile so that used locals in let constructs are cleaned at the end of the let form in a) toplevel let b) all let So the question now is if this is going to be fixed or if it is going to be a subtle point that can trick advanced users of guile but work most of the time in the name of speed. what do you think? /Stefan --001517740ae0a3fe9404b08896b1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

Sorry to spam the list.

But beeing a little ignorant how gui= le works, makes this a discovering procedure.

So locals is always al= located from the stack. This is what happens with Ians code.

A progr= am is executed and a set of locals is allocated on the stack for the durati= on of the loading, this means that during the
whole execution of the loaded file the locals variables are below the stack= pointer and hence always contains a reference from the stack to the last u= sed objects in the local variables. This can be seen by loading the file an= d then do an explicit gc on the repl. and then check the guardian. Then bec= ause the sp pointer is now below the locals in the loaded file they can be = gc:ed and is also returned by calls to the guardian.

What can be done?

1. One can push the constructors into function= s that are called from the toplevel in the code
2. One can patch guile s= o that used locals in let constructs are cleaned at the end of the let form= in
=A0=A0=A0 a) toplevel let
=A0=A0=A0 b) all let

So the question no= w is if this is going to be fixed or if it is going to be a subtle point th= at can trick
advanced users of guile but work most of the time in the n= ame of speed.

what do you think?

/Stefan


--001517740ae0a3fe9404b08896b1-- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 31 20:23:13 2011 Received: (at submit) by debbugs.gnu.org; 1 Nov 2011 00:23:13 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RL28H-0004Mr-LN for submit@debbugs.gnu.org; Mon, 31 Oct 2011 20:23:13 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RL28E-0004Mj-SV for submit@debbugs.gnu.org; Mon, 31 Oct 2011 20:23:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RL263-0008OC-CH for submit@debbugs.gnu.org; Mon, 31 Oct 2011 20:20:56 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:48488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RL263-0008O8-9X for submit@debbugs.gnu.org; Mon, 31 Oct 2011 20:20:55 -0400 Received: from eggs.gnu.org ([140.186.70.92]:43978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RL262-0003uO-Eb for bug-guile@gnu.org; Mon, 31 Oct 2011 20:20:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RL261-0008Np-JF for bug-guile@gnu.org; Mon, 31 Oct 2011 20:20:54 -0400 Received: from lo.gmane.org ([80.91.229.12]:36199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RL261-0008Ni-E9 for bug-guile@gnu.org; Mon, 31 Oct 2011 20:20:53 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RL25x-00041D-Ad for bug-guile@gnu.org; Tue, 01 Nov 2011 01:20:49 +0100 Received: from reverse-83.fdn.fr ([80.67.176.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 01 Nov 2011 01:20:49 +0100 Received: from ludo by reverse-83.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 01 Nov 2011 01:20:49 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-guile@gnu.org From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Subject: Re: bug#9900: local vars not cleaned Date: Tue, 01 Nov 2011 01:20:34 +0100 Lines: 21 Message-ID: <87wrbkg0bx.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: reverse-83.fdn.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 11 Brumaire 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 User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) Cancel-Lock: sha1:N/gHykSpykf7ymFQRoXMkTg0g0I= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Hi Stefan, Stefan Israelsson Tampe skribis: > A program is executed and a set of locals is allocated on the stack for the > duration of the loading, this means that during the > whole execution of the loaded file the locals variables are below the stack > pointer and hence always contains a reference from the stack to the last > used objects in the local variables. Normally the GC will only scan the relevant part of the VM stack–see ‘VM_ENABLE_PRECISE_STACK_GC_SCAN’ in vm.c. If you think this is not working as advertised, can you add a breakpoint in ‘vm_stack_mark’ and see what happens? To check your hypothesis you could also define ‘VM_ENABLE_STACK_NULLING’ in vm.c. TIA! :-) Ludo’. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 01 15:56:24 2011 Received: (at 9900) by debbugs.gnu.org; 1 Nov 2011 19:56:24 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RLKRb-0000as-Fv for submit@debbugs.gnu.org; Tue, 01 Nov 2011 15:56:24 -0400 Received: from a-pb-sasl-sd.pobox.com ([74.115.168.62] helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RLKRY-0000aj-VK for 9900@debbugs.gnu.org; Tue, 01 Nov 2011 15:56:22 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id C36057408; Tue, 1 Nov 2011 15:54: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:content-transfer-encoding; s=sasl; bh=cuvLBt1Bsc2o URY5qfA2ahwASoU=; b=Jo7BFfhKHLDZWQPur4/TFT6Epglx49Ikevu76A/rpgLG UlqT5ed7WOU/g4EJpKXra2CVfCd825GckmODuUXVaoHmIsaZVVzaLyoxbmrLdTkk SHa5KQPfG2OyGcOjeboIHulXVMDLuFVGSPrOc6yBOxrJvXPiJ8j31VsMSuDbqu8= 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:content-transfer-encoding; q=dns; s=sasl; b=o/ONAB JtGCiauWN/07zTh0bj2fJVjAVqZx+H5kbn4MPPebWmX/PIsSOPPb7+EVu2McDA0w AzmHPPA4Ibcjh9rCgmtM3pSt7vpDGgejecTH6lz2dnxMkkq2zegTSDduDQ9SY+Nq UeihrhcC4k7C9/GXq015mv7hfFkctUhc77kIw= Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id BC7117407; Tue, 1 Nov 2011 15:54:01 -0400 (EDT) Received: from badger (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 22D677406; Tue, 1 Nov 2011 15:54:00 -0400 (EDT) From: Andy Wingo To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: bug#9900: local vars not cleaned References: <87wrbkg0bx.fsf@gnu.org> Date: Tue, 01 Nov 2011 20:53:54 +0100 In-Reply-To: <87wrbkg0bx.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Tue, 01 Nov 2011 01:20:34 +0100") Message-ID: <877h3jy5yl.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Pobox-Relay-ID: 3E95D3DA-04C3-11E1-A81F-65B1DE995924-02397024!a-pb-sasl-sd.pobox.com X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 9900 Cc: 9900@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) Hi, On Tue 01 Nov 2011 01:20, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Stefan Israelsson Tampe skribis: > >> A program is executed and a set of locals is allocated on the stack for = the >> duration of the loading, this means that during the >> whole execution of the loaded file the locals variables are below the st= ack >> pointer and hence always contains a reference from the stack to the last >> used objects in the local variables. > > Normally the GC will only scan the relevant part of the VM stack=E2=80=93= see > =E2=80=98VM_ENABLE_PRECISE_STACK_GC_SCAN=E2=80=99 in vm.c. I think Stefan's analysis is right. VM marking is working as advertised. The problem is that the slot corresponding to the lexical `f' has not been nulled out. We can probably fix this by doing a local-set of the slot to `undefined' after leaving a `let', `letrec', or `fix' binding in non-tail context. Andy --=20 http://wingolog.org/ From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 09 17:47:20 2011 Received: (at 9900-done) by debbugs.gnu.org; 9 Nov 2011 22:47:20 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROGvQ-0003dP-FO for submit@debbugs.gnu.org; Wed, 09 Nov 2011 17:47:20 -0500 Received: from a-pb-sasl-sd.pobox.com ([74.115.168.62] helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROGvN-0003dH-CN for 9900-done@debbugs.gnu.org; Wed, 09 Nov 2011 17:47:18 -0500 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id CDCD78EA8; Wed, 9 Nov 2011 17:47:09 -0500 (EST) 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=SeF+oPx2AbCIURWagoNLFkaO0zg=; b=H0N+vv /q8VTnQJgNgCZcSGzdctuEpxRjgR1R9XEDRHwMXb5OWxFdmem1r9ozVEH/9Atdod d9immGS8YC/SkB3GSRoEgRAD5/TsySy7jywYGT/7Pm0tIhfp8fBFsOYK/MQ8nmJN mYB6BGRLCA/bPbMen1aZbnq2NkoogbWogg5iE= 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=lMxKZKIn6SA71dIPHHbTlXoekS9/8fDx VFIQ1mIGHcO3MUQkqt38NlAttKzSNUJBK8GCdhUSBPXLwnzQNb4BFAHL8gO5GiMZ jNPBymy5KaMDFzlO0Ny3X82GUWn5yH0N1ZY2/uHwaFPbvhNVTCgVCK5gdKdQ0Odj zhEkPcbiwLI= Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id C61458EA7; Wed, 9 Nov 2011 17:47:09 -0500 (EST) Received: from badger (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 317ED8EA6; Wed, 9 Nov 2011 17:47:08 -0500 (EST) From: Andy Wingo To: Ian Price Subject: Re: bug#9900: Using a guardian on a value in a weak hash References: Date: Wed, 09 Nov 2011 23:47:04 +0100 In-Reply-To: (Ian Price's message of "Fri, 28 Oct 2011 21:42:45 +0100") Message-ID: <87lirodic7.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Pobox-Relay-ID: C10E8EB2-0B24-11E1-8CCE-65B1DE995924-02397024!a-pb-sasl-sd.pobox.com X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 9900-done Cc: 9900-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) I believe I have fixed this bug in stable-2.0. Thanks for the report! Andy -- http://wingolog.org/ From unknown Fri Jun 20 05:35:52 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 08 Dec 2011 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 15 04:53:08 2011 Received: (at control) by debbugs.gnu.org; 15 Dec 2011 09:53:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rb7zv-0000qF-VU for submit@debbugs.gnu.org; Thu, 15 Dec 2011 04:53:08 -0500 Received: from mail4-relais-sop.national.inria.fr ([192.134.164.105]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rb7zq-0000pt-K8 for control@debbugs.gnu.org; Thu, 15 Dec 2011 04:53:04 -0500 X-IronPort-AV: E=Sophos;i="4.71,356,1320620400"; d="scan'208";a="123460308" Received: from unknown (HELO pluto) ([193.50.110.208]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 15 Dec 2011 10:51:32 +0100 From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) To: control@debbugs.gnu.org X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 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 Date: Thu, 15 Dec 2011 10:51:31 +0100 Message-ID: <87zkeucgd8.fsf@gnu.org> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.3 (-----) unarchive 9900 From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 15 13:42:56 2011 Received: (at 9900) by debbugs.gnu.org; 15 Dec 2011 18:42:56 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RbGGd-0007nH-S2 for submit@debbugs.gnu.org; Thu, 15 Dec 2011 13:42:56 -0500 Received: from mail4-relais-sop.national.inria.fr ([192.134.164.105]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RbGGa-0007n8-My for 9900@debbugs.gnu.org; Thu, 15 Dec 2011 13:42:54 -0500 X-IronPort-AV: E=Sophos;i="4.71,358,1320620400"; d="scan'208";a="123553078" Received: from reverse-83.fdn.fr (HELO pluto) ([80.67.176.83]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 15 Dec 2011 19:41:20 +0100 Resent-To: 9900@debbugs.gnu.org Resent-From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Resent-Date: Thu, 15 Dec 2011 19:41:19 +0100 Resent-Message-ID: <87vcphfzjk.fsf@gnu.org> From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) To: 9900@debbugs.gnu.org Subject: Re: bug#9900: Using a guardian on a value in a weak hash References: <87lirodic7.fsf@pobox.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 24 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 Date: Wed, 14 Dec 2011 22:49:10 +0100 In-Reply-To: <87lirodic7.fsf@pobox.com> (Andy Wingo's message of "Wed, 09 Nov 2011 23:47:04 +0100") Message-ID: <87fwgmkend.fsf@gnu.org> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Lines: 16 X-Spam-Score: -9.2 (---------) X-Debbugs-Envelope-To: 9900 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Resent-Date: Thu, 15 Dec 2011 13:42:55 -0500 X-Spam-Score: -9.2 (---------) Hello! It could be a coincidence, but the =E2=80=9CUnused modules are removed=E2= =80=9D test has been failing on i686-linux-gnu since commit fb135e12a473fd9a1612a59f904cfb90877fe775 (according to .) I can=E2=80=99t see how this commit could lead to a reference leak that wou= ld make the test fail, but I wanted to double-check with you. Ideas? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 15 16:57:30 2011 Received: (at 9900) by debbugs.gnu.org; 15 Dec 2011 21:57:30 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RbJIw-0003lg-1d for submit@debbugs.gnu.org; Thu, 15 Dec 2011 16:57:30 -0500 Received: from a-pb-sasl-sd.pobox.com ([74.115.168.62] helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RbJIs-0003lY-QU for 9900@debbugs.gnu.org; Thu, 15 Dec 2011 16:57:28 -0500 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 936268234; Thu, 15 Dec 2011 16:55:54 -0500 (EST) 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:content-transfer-encoding; s=sasl; bh=TU2t3X1vH5Qm HsVwx9PZEwg5DKU=; b=K8+8EyZB7+UlsFrA7yKx46PdmmHHZn76IwN3bVWvAB6e +4ykiSJGaz2RmlEVoIgvEnT8BZ/hNUWoyW2uyC0neur+j6dVikUM0PQtDPVRAR89 FskjBh4EY3p6+FZZO2mqqTqIHETth+LwfXaDWgV07B+T8YSxEz5nlLFkD96mx14= 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:content-transfer-encoding; q=dns; s=sasl; b=G2ftwO rktL7cKco22TcLyPgjjGTQ72My0G7d+WopqP96R2ep3AMiwCTpG4IjJzpT8KYDxp kvRYLubfuebhfJsUXpxHSn/nkgIxunmEtL29bKVxVtoIiXoqYdu9A4haAeFMRqgr tmGzV6qpNhAf3TyiOlMGwymwqoL7075XEP9Vc= Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 8AE058233; Thu, 15 Dec 2011 16:55:54 -0500 (EST) Received: from badger (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id C903B8232; Thu, 15 Dec 2011 16:55:52 -0500 (EST) From: Andy Wingo To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: bug#9900: Using a guardian on a value in a weak hash References: <87lirodic7.fsf@pobox.com> <87fwgmkend.fsf@gnu.org> Date: Thu, 15 Dec 2011 22:55:48 +0100 In-Reply-To: <87fwgmkend.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Wed, 14 Dec 2011 22:49:10 +0100") Message-ID: <87pqfpts7v.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Pobox-Relay-ID: 8EE53350-2767-11E1-B9A6-65B1DE995924-02397024!a-pb-sasl-sd.pobox.com X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 9900 Cc: 9900@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) On Wed 14 Dec 2011 22:49, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Hello! > > It could be a coincidence, but the =E2=80=9CUnused modules are removed=E2= =80=9D test has > been failing on i686-linux-gnu since commit > fb135e12a473fd9a1612a59f904cfb90877fe775 (according to > .) > > I can=E2=80=99t see how this commit could lead to a reference leak that w= ould > make the test fail, but I wanted to double-check with you. > > Ideas? Is the stack-clearing code not doing its job, somehow? Hummmm. I'll look into this later if no one gets around to it, but investigation would be appreciated ;-) Cheers, Andy --=20 http://wingolog.org/ From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 18 18:40:23 2011 Received: (at 9900) by debbugs.gnu.org; 18 Dec 2011 23:40:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RcQL9-0001WL-9l for submit@debbugs.gnu.org; Sun, 18 Dec 2011 18:40:23 -0500 Received: from mail4-relais-sop.national.inria.fr ([192.134.164.105]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RcQL7-0001WD-6p for 9900@debbugs.gnu.org; Sun, 18 Dec 2011 18:40:22 -0500 X-IronPort-AV: E=Sophos;i="4.71,373,1320620400"; d="scan'208";a="123840151" Received: from reverse-83.fdn.fr (HELO pluto) ([80.67.176.83]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 19 Dec 2011 00:38:30 +0100 From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) To: Andy Wingo Subject: Re: bug#9900: Using a guardian on a value in a weak hash References: <87lirodic7.fsf@pobox.com> <87fwgmkend.fsf@gnu.org> <87pqfpts7v.fsf@pobox.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 29 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 Date: Mon, 19 Dec 2011 00:38:29 +0100 In-Reply-To: <87pqfpts7v.fsf@pobox.com> (Andy Wingo's message of "Thu, 15 Dec 2011 22:55:48 +0100") Message-ID: <871us1ih6y.fsf@gnu.org> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -9.2 (---------) X-Debbugs-Envelope-To: 9900 Cc: 9900@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -9.2 (---------) Hi! Andy Wingo skribis: > On Wed 14 Dec 2011 22:49, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >> Hello! >> >> It could be a coincidence, but the =E2=80=9CUnused modules are removed= =E2=80=9D test has >> been failing on i686-linux-gnu since commit >> fb135e12a473fd9a1612a59f904cfb90877fe775 (according to >> .) >> >> I can=E2=80=99t see how this commit could lead to a reference leak that = would >> make the test fail, but I wanted to double-check with you. >> >> Ideas? > > Is the stack-clearing code not doing its job, somehow? Hummmm. Well, there was no stack-clearing code before anyway, so I can=E2=80=99t se= e how this could be the problem. Yet, it=E2=80=99s annoying. ;-) The failure shows up on i686 and not on x86_64. Thanks, Ludo=E2=80=99. From unknown Fri Jun 20 05:35:52 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 16 Jan 2012 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator