From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: bug#19235: make-fresh-user-module procedure leaks memory Date: Wed, 22 Jun 2016 19:52:01 +0200 Message-ID: <87por9ru0u.fsf@pobox.com> References: <20141130232834.32cbf5b2@bother.homenet> <87iohn51dc.fsf@yeeloong.lan> <20141207141903.1347c764@bother.homenet> <20141226182608.24c7dabf@bother.homenet> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1466618134 23496 80.91.229.3 (22 Jun 2016 17:55:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Jun 2016 17:55:34 +0000 (UTC) Cc: ludo@gnu.org, 19235@debbugs.gnu.org, 15602@debbugs.gnu.org To: Chris Vine Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed Jun 22 19:55:19 2016 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 1bFmL0-00048F-JA for guile-bugs@m.gmane.org; Wed, 22 Jun 2016 19:53:18 +0200 Original-Received: from localhost ([::1]:60091 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFmKz-0001Sb-Q4 for guile-bugs@m.gmane.org; Wed, 22 Jun 2016 13:53:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52283) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFmKq-0001Pl-Sa for bug-guile@gnu.org; Wed, 22 Jun 2016 13:53:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFmKk-0007Du-O2 for bug-guile@gnu.org; Wed, 22 Jun 2016 13:53:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39079) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFmKk-0007Dq-Kj for bug-guile@gnu.org; Wed, 22 Jun 2016 13:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bFmKk-0000cN-DO for bug-guile@gnu.org; Wed, 22 Jun 2016 13:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andy Wingo Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 22 Jun 2016 17:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19235 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 19235-submit@debbugs.gnu.org id=B19235.14666179352307 (code B ref 19235); Wed, 22 Jun 2016 17:53:02 +0000 Original-Received: (at 19235) by debbugs.gnu.org; 22 Jun 2016 17:52:15 +0000 Original-Received: from localhost ([127.0.0.1]:51415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFmJz-0000b4-Fn for submit@debbugs.gnu.org; Wed, 22 Jun 2016 13:52:15 -0400 Original-Received: from pb-sasl1.pobox.com ([64.147.108.66]:58329 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFmJv-0000ao-DG; Wed, 22 Jun 2016 13:52:13 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id B73731FFC6; Wed, 22 Jun 2016 13:52:09 -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=uHz8mIV11CKPJO+Gvjt3WnWbTK0=; b=uDFhaM YpKzW04+r+tQpmZHEnji5PdvR3LCIYoTc1X3ozbQSRYQWXiSuQcOYoOQ/TnNjTP2 fAUbvrY+WqSqt3hqVDmB2V74VTQDXlt0XdZON1N6eKt9HMDHtbIVpRq2ivLrbM8o E8AWig0NCN5XnW2zSXETulJds2wuu6CjsTcXc= 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=rIDWMjJzFBxMwmSAj560Gdt2NWWqaQ9L BYnBccZ6mTZqxTpKc2nGNKTe4hHCCA1kHoTQbW7x9Qb0OQ/9Fgm8RpD766yBJLTz Ro2ULFoZt3sBK2l08aYbL2gZd/1s8Zd/UrKz9tQlLItpkinBMRZPXHhyvnDzK4mc HoZlIsW5BNo= Original-Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id AFEC91FFC5; Wed, 22 Jun 2016 13:52:09 -0400 (EDT) Original-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 CBAC11FFC4; Wed, 22 Jun 2016 13:52:08 -0400 (EDT) In-Reply-To: <20141226182608.24c7dabf@bother.homenet> (Chris Vine's message of "Fri, 26 Dec 2014 18:26:08 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-Pobox-Relay-ID: 0A5E99C2-38A2-11E6-BF3F-C1836462E9F6-02397024!pb-sasl1.pobox.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.lisp.guile.bugs:8130 Archived-At: In many ways I think Ludovic was right in #15602 -- we should allow excursions to isolate changes to the module tree. Sometimes you want an excursion to never add a module to the tree. Sometimes you do, but maybe all in one go and with a mutex, to avoid races -- like, you could load a file or evaluate some code in a private fork of the module tree, but then commit it to the main tree afterwards. Is that a sensible thing? Andy On Fri 26 Dec 2014 19:26, Chris Vine writes: > As far as I can tell the make-fresh-user-module procedure is not called > by guile itself, and providing a global mutex for it with a binding > enabling it to be called from scheme code seems to work fine. > > This also makes it straightforward to incorporate in a thread-safe > way the code you suggested to free stale user modules. However, as I > mentioned, I am a bit reluctant to incorporate code which might break > in the future. Is there any possibility that a "delete-module!" > procedure could be included within the public guile API for the next > release of guile? It seems like something that could be useful to > anyone using non-default user modules in their code. > > Chris