From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: bdw-gc includes in libguile.h Date: Mon, 28 Mar 2011 21:22:13 +0200 Message-ID: <87hbangie2.fsf@gnu.org> References: <87hbardqgw.fsf@gnu.org> <874o6ovbsa.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1301340154 2715 80.91.229.12 (28 Mar 2011 19:22:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 28 Mar 2011 19:22:34 +0000 (UTC) Cc: guile-devel@gnu.org To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Mar 28 21:22:30 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q4I1F-0005qt-PD for guile-devel@m.gmane.org; Mon, 28 Mar 2011 21:22:29 +0200 Original-Received: from localhost ([127.0.0.1]:51699 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4I1E-0006lA-Rb for guile-devel@m.gmane.org; Mon, 28 Mar 2011 15:22:28 -0400 Original-Received: from [140.186.70.92] (port=45229 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4I17-0006l1-P3 for guile-devel@gnu.org; Mon, 28 Mar 2011 15:22:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4I16-0005Yw-DZ for guile-devel@gnu.org; Mon, 28 Mar 2011 15:22:21 -0400 Original-Received: from solo.fdn.fr ([80.67.169.19]:40031) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4I16-0005Yl-97 for guile-devel@gnu.org; Mon, 28 Mar 2011 15:22:20 -0400 Original-Received: from nixey (reverse-83.fdn.fr [80.67.176.83]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) (Authenticated sender: lcourtes) by smtp.fdn.fr (Postfix) with ESMTPSA id BF60344B6C; Mon, 28 Mar 2011 21:22:18 +0200 (CEST) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 8 Germinal an 219 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 In-Reply-To: (Andy Wingo's message of "Mon, 28 Mar 2011 09:35:02 +0200") User-Agent: Gnus/5.110013 (No Gnus v0.13) Emacs/23.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 80.67.169.19 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:12024 Archived-At: Hello! Andy Wingo writes: >>> Sure. Sorry for the precipitous action. That said, this bug has been >>> open since September: https://savannah.gnu.org/bugs/?32436 >> >> Oh indeed, I hadn=E2=80=99t realized there=E2=80=99s a connection; still= ... > > Do you have any thoughts on that bug, The problem is that libgc ends up being initialized behind our back upon the first libgc-redirected =E2=80=98pthread_create=E2=80=99 call. Hans Boehm suggested [0] two solutions: 1. Disable pthread redirects and instead register threads explicitly (in =E2=80=98scm_with_guile=E2=80=99). 2. Initialize libgc in a constructor. I was leaning towards (2), because this way we=E2=80=99d be in control, and= in particular we=E2=80=99d have GC_all_interior_pointers =3D 0. It would only= work on GCC/ELF platforms, and only if libgc wasn=E2=80=99t already initialized = (for instance if Guile is used in an application that already uses libgc on its own)=E2=80=94but that really covers 90% of our use cases. I understand you=E2=80=99re in favor of (1). This would give the same beha= vior as in 1.8[*] while being less hackish than (2). However, it=E2=80=99s only applicable to 2.1. Thus, I think we could go with (2) in 2.0 (on platforms where constructors are available), and with (1) in 2.2. [0] http://thread.gmane.org/gmane.lisp.guile.bugs/5340 [*] The behavior in 1.8 is that the non-guile-mode stack isn=E2=80=99t scan= ned. I would find it less error-prone if all the stacks were scanned by default, but it=E2=80=99s not that important either. > or the recent threads.c patches? Yes, see <87vczdqtdx.fsf@gnu.org>. :-) (There are a couple of build failures on Hydra since these patches, but we=E2=80=99ll see that after.) Thanks! Ludo=E2=80=99.