From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Cedric Cellier Newsgroups: gmane.lisp.guile.user Subject: Re: Latest guile 1.9 segfault in GC Date: Tue, 17 Aug 2010 15:08:16 +0200 Message-ID: <20100817130816.GA2519@securactive.net> References: <20100817090911.GA27087@securactive.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1282050517 9274 80.91.229.12 (17 Aug 2010 13:08:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 17 Aug 2010 13:08:37 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Aug 17 15:08:34 2010 Return-path: Envelope-to: guile-user@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 1OlLu5-00054t-ML for guile-user@m.gmane.org; Tue, 17 Aug 2010 15:08:34 +0200 Original-Received: from localhost ([127.0.0.1]:53063 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OlLu4-0005DY-UD for guile-user@m.gmane.org; Tue, 17 Aug 2010 09:08:32 -0400 Original-Received: from [140.186.70.92] (port=48751 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OlLtz-0005Cv-Et for guile-user@gnu.org; Tue, 17 Aug 2010 09:08:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OlLty-00017G-6o for guile-user@gnu.org; Tue, 17 Aug 2010 09:08:27 -0400 Original-Received: from smtp5-g21.free.fr ([212.27.42.5]:52152) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OlLtx-00016g-Ir for guile-user@gnu.org; Tue, 17 Aug 2010 09:08:26 -0400 Original-Received: from apc.happyleptic.org (unknown [82.67.194.89]) by smtp5-g21.free.fr (Postfix) with ESMTP id 0D395D48111 for ; Tue, 17 Aug 2010 15:08:18 +0200 (CEST) Original-Received: from ccellier.rd.securactive.lan (extranet.securactive.org [82.234.213.170]) by apc.happyleptic.org (Postfix) with ESMTP id 4483A33812 for ; Tue, 17 Aug 2010 15:14:31 +0200 (CEST) Original-Received: from rixed by ccellier.rd.securactive.lan with local (Exim 4.71) (envelope-from ) id 1OlLto-0000hV-9j for guile-user@gnu.org; Tue, 17 Aug 2010 15:08:16 +0200 Mail-Followup-To: Cedric Cellier , guile-user@gnu.org Content-Disposition: inline In-Reply-To: <20100817090911.GA27087@securactive.net> User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:8067 Archived-At: I'm using libgc v 7.2alpha4. Apparently the value of GC_all_interior_pointers is 1 when initializing the GC (so GC_old_normal_bl is not initialized) and suddenly is set to 1 so that the next call to GC_is_black_listed dereference it and thus crash. It's set to 0 by scm_storage_prehistory in liguile. I do not understand how this GC works, but find it strange that this global variable is changed like this, especially since the libgc gc.h reads : "GC_all_interior_pointers (...) May not be changed after GC initialization." How come the libgc GC_init function was already called when scm_storage_prehistory is called ? Apparently, the libgc overload pthread_create with its GC_pthread_create(). So, guile must be inited before starting any thread. Let's try... OK, it works. :-)