From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.bugs Subject: Re: guile 1.9.0 scm_read_hash_extend gc trouble Date: Tue, 23 Jun 2009 00:25:48 +0100 Message-ID: <87bpof7sw3.fsf@arudy.ossau.uklinux.net> References: <20090621120823.M97037@ccrma.Stanford.EDU> <873a9tr46q.fsf@arudy.ossau.uklinux.net> <87skhtpolb.fsf@arudy.ossau.uklinux.net> <20090622171923.M95660@ccrma.Stanford.EDU> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1245713204 30504 80.91.229.12 (22 Jun 2009 23:26:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Jun 2009 23:26:44 +0000 (UTC) Cc: bug-guile@gnu.org To: "Bill Schottstaedt" Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Jun 23 01:26:40 2009 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MIsuN-0001WH-9M for guile-bugs@m.gmane.org; Tue, 23 Jun 2009 01:26:39 +0200 Original-Received: from localhost ([127.0.0.1]:52230 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MIsuM-0007j9-M5 for guile-bugs@m.gmane.org; Mon, 22 Jun 2009 19:26:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MIsuH-0007i0-11 for bug-guile@gnu.org; Mon, 22 Jun 2009 19:26:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MIsuC-0007fw-5R for bug-guile@gnu.org; Mon, 22 Jun 2009 19:26:32 -0400 Original-Received: from [199.232.76.173] (port=55196 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MIsuB-0007ft-Vv for bug-guile@gnu.org; Mon, 22 Jun 2009 19:26:28 -0400 Original-Received: from mail3.uklinux.net ([80.84.72.33]:33915) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MIsuB-0001rW-H4 for bug-guile@gnu.org; Mon, 22 Jun 2009 19:26:27 -0400 Original-Received: from arudy (host86-152-99-133.range86-152.btcentralplus.com [86.152.99.133]) by mail3.uklinux.net (Postfix) with ESMTP id 007421FB7F2; Tue, 23 Jun 2009 00:25:48 +0100 (BST) Original-Received: from arudy.ossau.uklinux.net (arudy [127.0.0.1]) by arudy (Postfix) with ESMTP id 40B603801F; Tue, 23 Jun 2009 00:25:48 +0100 (BST) In-Reply-To: <20090622171923.M95660@ccrma.Stanford.EDU> (Bill Schottstaedt's message of "Mon\, 22 Jun 2009 10\:23\:09 -0700") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:4237 Archived-At: "Bill Schottstaedt" writes: > I believe this is a GC problem; you're doing exactly what I'm doing, > but in a context where the GC is not called. If I place the > skip comment function in its own file, and compile it > with optimization turned off, everything is happy; if > optimization is on (either -O or -O2), it dies. I tried compiling my test with -O2; unfortunately it's still OK. > According to > valgrind the problem is in scm_getc -- the SCM_PTAB_ENTRY > pointer "pt" does not point to a valid structure, so the read > and subsuequent write through pt goes off into unallocated > memory. I haven't tracked down the actual problem yet, > but gc-protecting the "port" variable does no good. Do you mean you think that pt has already been freed, or that it was never valid? If the former, it sounds like it would be worth trying to prove this, by adding instrumentation to scm_gc_free that prints the pointer to stdout whenever what is "port". You could also instrument (or set a breakpoint on) scm_igc, to investigate the GC factor. I'm sorry that we've apparently broken this for you, and that I can't help more yet... Regards, Neil