From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Bill Schottstaedt" Newsgroups: gmane.lisp.guile.bugs Subject: Re: guile 1.9.0 scm_read_hash_extend gc trouble Date: Mon, 22 Jun 2009 10:23:09 -0700 Message-ID: <20090622171923.M95660@ccrma.Stanford.EDU> References: <20090621120823.M97037@ccrma.Stanford.EDU> <873a9tr46q.fsf@arudy.ossau.uklinux.net> <87skhtpolb.fsf@arudy.ossau.uklinux.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Trace: ger.gmane.org 1245691407 24952 80.91.229.12 (22 Jun 2009 17:23:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Jun 2009 17:23:27 +0000 (UTC) Cc: bug-guile@gnu.org To: Neil Jerram Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Jun 22 19:23:23 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 1MInEp-0002XR-3D for guile-bugs@m.gmane.org; Mon, 22 Jun 2009 19:23:23 +0200 Original-Received: from localhost ([127.0.0.1]:48400 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MInEo-0003XD-BT for guile-bugs@m.gmane.org; Mon, 22 Jun 2009 13:23:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MInEk-0003WD-BM for bug-guile@gnu.org; Mon, 22 Jun 2009 13:23:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MInEf-0003V8-11 for bug-guile@gnu.org; Mon, 22 Jun 2009 13:23:17 -0400 Original-Received: from [199.232.76.173] (port=44190 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MInEe-0003V5-Ph for bug-guile@gnu.org; Mon, 22 Jun 2009 13:23:12 -0400 Original-Received: from smtp5.stanford.edu ([171.67.219.85]:43999) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MInEe-00046E-Fm for bug-guile@gnu.org; Mon, 22 Jun 2009 13:23:12 -0400 Original-Received: from smtp5.stanford.edu (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with SMTP id 28DA518F60C; Mon, 22 Jun 2009 10:23:11 -0700 (PDT) Original-Received: from cm-mail.stanford.edu (cm-mail.Stanford.EDU [171.64.197.135]) by smtp5.stanford.edu (Postfix) with ESMTP id A3E5E18F5A2; Mon, 22 Jun 2009 10:23:10 -0700 (PDT) Original-Received: from ccrma.Stanford.EDU (localhost.localdomain [127.0.0.1]) by cm-mail.stanford.edu (8.13.8/8.13.8) with ESMTP id n5MHN9HS021778; Mon, 22 Jun 2009 10:23:09 -0700 In-Reply-To: <87skhtpolb.fsf@arudy.ossau.uklinux.net> X-Mailer: OpenWebMail 2.53 X-OriginatingIP: 71.198.184.220 (bil) X-Virus-Scanned: ClamAV 0.94/9495/Mon Jun 22 07:43:57 2009 on cm-mail.stanford.edu X-Virus-Status: Clean X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:4236 Archived-At: > Can you spot some way in which what you are doing > is different to this? 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. 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.