From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chris Vine Newsgroups: gmane.lisp.guile.bugs Subject: bug#19235: make-fresh-user-module procedure leaks memory Date: Fri, 26 Dec 2014 18:26:08 +0000 Message-ID: <20141226182608.24c7dabf@bother.homenet> References: <20141130232834.32cbf5b2@bother.homenet> <87iohn51dc.fsf@yeeloong.lan> <20141207141903.1347c764@bother.homenet> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1419618438 30981 80.91.229.3 (26 Dec 2014 18:27:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Dec 2014 18:27:18 +0000 (UTC) Cc: 19235@debbugs.gnu.org To: Mark H Weaver Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Fri Dec 26 19:27:10 2014 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 1Y4ZbS-0000rP-F4 for guile-bugs@m.gmane.org; Fri, 26 Dec 2014 19:27:10 +0100 Original-Received: from localhost ([::1]:54135 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4ZbR-0007wh-JD for guile-bugs@m.gmane.org; Fri, 26 Dec 2014 13:27:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4ZbO-0007wU-F6 for bug-guile@gnu.org; Fri, 26 Dec 2014 13:27:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y4ZbK-0005pm-T6 for bug-guile@gnu.org; Fri, 26 Dec 2014 13:27:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49016) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4ZbK-0005pf-Ph for bug-guile@gnu.org; Fri, 26 Dec 2014 13:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y4ZbK-0001xG-Cm for bug-guile@gnu.org; Fri, 26 Dec 2014 13:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Chris Vine Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 26 Dec 2014 18:27: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.14196183747451 (code B ref 19235); Fri, 26 Dec 2014 18:27:02 +0000 Original-Received: (at 19235) by debbugs.gnu.org; 26 Dec 2014 18:26:14 +0000 Original-Received: from localhost ([127.0.0.1]:58382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y4ZaY-0001w6-B7 for submit@debbugs.gnu.org; Fri, 26 Dec 2014 13:26:14 -0500 Original-Received: from smtpout5.wanadoo.co.uk ([80.12.242.80]:24047 helo=smtpout.wanadoo.co.uk) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y4ZaU-0001vs-JH for 19235@debbugs.gnu.org; Fri, 26 Dec 2014 13:26:13 -0500 Original-Received: from laptop.homenet ([95.146.111.203]) by mwinf5d66 with ME id YJS81p00E4PMKgF03JS8Ln; Fri, 26 Dec 2014 19:26:08 +0100 X-ME-Helo: laptop.homenet X-ME-Date: Fri, 26 Dec 2014 19:26:08 +0100 X-ME-IP: 95.146.111.203 Original-Received: from bother.homenet (localhost [127.0.0.1]) by laptop.homenet (Postfix) with ESMTP id 7513E8C1F0; Fri, 26 Dec 2014 18:26:08 +0000 (GMT) In-Reply-To: <20141207141903.1347c764@bother.homenet> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; i686-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:7694 Archived-At: 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