From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Gran Newsgroups: gmane.lisp.guile.bugs Subject: bug#20907: [PATCH] Manual bug for scm_gc_protect_object Date: Wed, 2 Sep 2015 17:12:31 +0000 (UTC) Message-ID: <572469453.502254.1441213951447.JavaMail.yahoo@mail.yahoo.com> References: <87r3mg23wc.fsf@netris.org> Reply-To: Mike Gran NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1441214073 27448 80.91.229.3 (2 Sep 2015 17:14:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Sep 2015 17:14:33 +0000 (UTC) Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , "20907@debbugs.gnu.org" <20907@debbugs.gnu.org> To: Mark H Weaver Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed Sep 02 19:14:16 2015 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 1ZXBby-0003iZ-E1 for guile-bugs@m.gmane.org; Wed, 02 Sep 2015 19:14:14 +0200 Original-Received: from localhost ([::1]:39773 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXBby-0007OO-Pa for guile-bugs@m.gmane.org; Wed, 02 Sep 2015 13:14:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45421) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXBbs-0007Nv-C3 for bug-guile@gnu.org; Wed, 02 Sep 2015 13:14:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXBbm-0001eH-Ob for bug-guile@gnu.org; Wed, 02 Sep 2015 13:14:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54462) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXBbm-0001dc-JS for bug-guile@gnu.org; Wed, 02 Sep 2015 13:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZXBbm-0008JP-4F for bug-guile@gnu.org; Wed, 02 Sep 2015 13:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mike Gran Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 02 Sep 2015 17:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20907 X-GNU-PR-Package: guile X-GNU-PR-Keywords: patch Original-Received: via spool by 20907-submit@debbugs.gnu.org id=B20907.144121401131868 (code B ref 20907); Wed, 02 Sep 2015 17:14:02 +0000 Original-Received: (at 20907) by debbugs.gnu.org; 2 Sep 2015 17:13:31 +0000 Original-Received: from localhost ([127.0.0.1]:46672 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZXBbH-0008Hs-5Q for submit@debbugs.gnu.org; Wed, 02 Sep 2015 13:13:31 -0400 Original-Received: from nm10-vm2.bullet.mail.ne1.yahoo.com ([98.138.90.158]:37915) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZXBbF-0008Hg-A6 for 20907@debbugs.gnu.org; Wed, 02 Sep 2015 13:13:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1441214008; bh=M2Qk05/0zXsWB0ZFq8JWjOW+E5n2Hhv5Grk7TQsUr7w=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:From:Subject; b=KeTSAXrn33oB/tYEEkmJ/p2xVgf/FyuGYs5Dnpwj6+yJpg4Cqse5D7bE0Ap0L0g32GwiSCDd+JC4mr9rMBR5G6JPtTBy59TCWcvN+l7zPOmSqZ3IL3K8AKzL0lL91vyIQAs7IZNqjfUAe0vOi6RscH28NQox7EvVhfMDG6FkFuRu178fIx4DhmXFVUgsyRDmVmL93oB2lsC+DAYKKinClEVjhC1xMpwXZqmR0XWCF9VXd+9+TdbUL+n2fv8BPAQ4tSwoXy6yQPD9LtUg6hoENJcnDsUBXR/qD0NQYnosCQwcTVsA6PJGmMxRxsJaWZV+yykNc7eCxWppuxDmG5ii6Q== Original-Received: from [98.138.101.131] by nm10.bullet.mail.ne1.yahoo.com with NNFMP; 02 Sep 2015 17:13:28 -0000 Original-Received: from [98.138.89.164] by tm19.bullet.mail.ne1.yahoo.com with NNFMP; 02 Sep 2015 17:13:28 -0000 Original-Received: from [127.0.0.1] by omp1020.mail.ne1.yahoo.com with NNFMP; 02 Sep 2015 17:13:28 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 589565.28391.bm@omp1020.mail.ne1.yahoo.com X-YMail-OSG: kU9lC_YVM1nb6sDO7ZTJkprkaoAQJC94jW.0C4CxyCnHdQ.1Vzx3Emwk8m6fT2c 2bhWe9kjmh_gL6aw9Yhm4JwWa7y88jDY86wndTr_YaGiMUXhl1gJoJkrPXKGo.P0mRCUA79ZsJfI W_NRSyZEofbpGaKgPuzxV8njJJp4xQG5SlhEmm_k4OhI6ThYf0wzMFLdpN.ZN_hLbbYeykkPRfgd tnlSHWYJb_ZpIvD3KVXHqq0FLTklbR_zPZGftoTH.lxAZC2DgcPgfUD8ns.oaGdDgTC_xLL7z9rq 8PpR4EOhb_zPL70cGD_SB3x0bW0_ypUGBTdgl2KSQcAa5j5SFNpfAACdzILkkZfw07QenFOkjwHB JBURy8F4YWNigC0guUS6u9TQwF_uLdoiLMVIlNW1SIok.Mcq_N119Ru8Dg8ervPOoQ7Ik5l4zLS6 1UL9UhrOxjUe3OtecGhge1kOqb0l28pzoeAZDkjVzqdkyVw81gxvkz5fQVHGpF1E3R4ojzf0P5Fg ybA-- Original-Received: by 98.138.101.174; Wed, 02 Sep 2015 17:13:28 +0000 In-Reply-To: <87r3mg23wc.fsf@netris.org> 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: 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-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7842 Archived-At: > On Wednesday, September 2, 2015 9:16 AM, Mark H Weaver wrote: > If global C variables were scanned by default in 1.8, as you asserted, > then why would the unprotected string have been freed? > > Am I missing something? I apologize in advance for the pedantry below. Maybe I just don't understand GC nomenclature. I thought that if a global variable were not "scanned" by a garbage collector, it would be invisible to the garbage collector, and could not be freed by the garbage collector. The footnote in question says that for 1.8, globals were not "scanned", which I understood to mean that globals were invisible to to the garbage collector and could not be freed by the GC. The implication is that, for 2.0, globals were "scanned", which I understood to mean that they were visible to the GC and could be freed. My test program shows that globals are GC'd in 1.8, but, not 2.0. That is why I believe the logic of the footnote to be wrong, and that the "not" should be removed. But I guess from context that you and Ludo have a different definition for "to scan", and that scanning protects something from being GC'd? In the "Garbage Collection" of the manual in both 1.8 and 2.0, it says that in 1.8, that "global variables of type SCM ... can be made visible to the garbage collector by calling the functions scm_gc_protect". (That's a typo I guess. It should say scm_gc_protect_object, I think.) The implication is that if I do not call scm_gc_protect_object, my global is still "invisible" and thus can't be freed by the GC. But my "invisible" global in 1.8 is being freed and in 2.0 it is not freed. The only mention of the difference between 1.8 and 2.0 is in the footnote in question. Look, it is fine, though. Don't waste your time on this if I'm just confused. Thanks, Mike