From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.bugs Subject: bug#20907: [PATCH] Manual bug for scm_gc_protect_object Date: Wed, 02 Sep 2015 14:08:52 +0200 Message-ID: <87a8t5c9bf.fsf@gnu.org> References: <1019343405.630040.1435359632144.JavaMail.yahoo@mail.yahoo.com> <87wpw97f9i.fsf@netris.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1441195769 6345 80.91.229.3 (2 Sep 2015 12:09:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Sep 2015 12:09:29 +0000 (UTC) Cc: 20907@debbugs.gnu.org, Mike Gran To: Mark H Weaver Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed Sep 02 14:09: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 1ZX6qk-0000TW-V4 for guile-bugs@m.gmane.org; Wed, 02 Sep 2015 14:09:11 +0200 Original-Received: from localhost ([::1]:37060 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZX6qk-0004rO-Ls for guile-bugs@m.gmane.org; Wed, 02 Sep 2015 08:09:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZX6qd-0004r7-HG for bug-guile@gnu.org; Wed, 02 Sep 2015 08:09:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZX6qc-0002ZU-CS for bug-guile@gnu.org; Wed, 02 Sep 2015 08:09:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53809) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZX6qc-0002Yw-A5 for bug-guile@gnu.org; Wed, 02 Sep 2015 08:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZX6qb-0007g2-TK for bug-guile@gnu.org; Wed, 02 Sep 2015 08:09:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 02 Sep 2015 12:09:01 +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.144119574029503 (code B ref 20907); Wed, 02 Sep 2015 12:09:01 +0000 Original-Received: (at 20907) by debbugs.gnu.org; 2 Sep 2015 12:09:00 +0000 Original-Received: from localhost ([127.0.0.1]:46019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZX6qa-0007fm-9L for submit@debbugs.gnu.org; Wed, 02 Sep 2015 08:09:00 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43385) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZX6qY-0007ff-NX for 20907@debbugs.gnu.org; Wed, 02 Sep 2015 08:08:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZX6qW-0002X3-3G for 20907@debbugs.gnu.org; Wed, 02 Sep 2015 08:08:58 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33771) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZX6qV-0002Wz-WF; Wed, 02 Sep 2015 08:08:56 -0400 Original-Received: from reverse-83.fdn.fr ([80.67.176.83]:47133 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1ZX6qU-0000aj-Vi; Wed, 02 Sep 2015 08:08:55 -0400 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 16 Fructidor an 223 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x3D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <87wpw97f9i.fsf@netris.org> (Mark H. Weaver's message of "Tue, 01 Sep 2015 21:59:21 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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:7838 Archived-At: Mark H Weaver skribis: > Mike Gran writes: >> Manual claims C globals weren't scanned by GC in 1.8. The opposite >> is true. > > Ludovic wrote that text in 2009, commit > f07c349eb38d6c7b160b8980fc4007fb502e3433. I think the manual is correct: global C variables were *not* scanned by the GC. As an example, see =E2=80=98scm_sys_protects=E2=80=99 in 1.8: It= =E2=80=99s a global array that was explicitly scanned by the GC, because that=E2=80=99s basical= ly the only mechanism to add new GC root: j =3D SCM_NUM_PROTECTS; while (j--) scm_gc_mark (scm_sys_protects[j]); The 1.8 manual reads: Other references to 'SCM' objects, such as global variables of type 'SCM' or other random data structures in the heap that contain fields of type 'SCM', can be made visible to the garbage collector by calling the functions 'scm_gc_protect' or 'scm_permanent_object'. You normally use these funtions for long lived objects such as a hash table that is stored in a global variable. For temporary references in local variables or function arguments, using these functions would be too expensive. http://www.gnu.org/software/guile/docs/docs-1.8/guile-ref/Garbage-Collectio= n.html So I think we can close as =E2=80=98notabug=E2=80=99? :-) Ludo=E2=80=99.