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: compiling with -DSCM_DEBUG=1 Date: Mon, 07 Sep 2009 11:22:25 +0200 Message-ID: <87my57m7n2.fsf@gnu.org> References: <87ljky5ug4.fsf@gnu.org> <86DCB6A5-5CBD-4779-8FEE-7DFD345C9775@raeburn.org> <57660D04-1760-48E5-BA55-74321E89D654@raeburn.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1252315397 8746 80.91.229.12 (7 Sep 2009 09:23:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Sep 2009 09:23:17 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Sep 07 11:23:10 2009 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.50) id 1MkaRJ-0003Ur-Lo for guile-devel@m.gmane.org; Mon, 07 Sep 2009 11:23:09 +0200 Original-Received: from localhost ([127.0.0.1]:60683 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MkaRI-0008T6-Pe for guile-devel@m.gmane.org; Mon, 07 Sep 2009 05:23:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MkaR8-0008Sz-Ld for guile-devel@gnu.org; Mon, 07 Sep 2009 05:22:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MkaR3-0008Sn-Az for guile-devel@gnu.org; Mon, 07 Sep 2009 05:22:57 -0400 Original-Received: from [199.232.76.173] (port=57026 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MkaR3-0008Sk-3n for guile-devel@gnu.org; Mon, 07 Sep 2009 05:22:53 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:46051) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MkaR2-0007qN-Is for guile-devel@gnu.org; Mon, 07 Sep 2009 05:22:52 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1MkaQx-0003NY-Pf for guile-devel@gnu.org; Mon, 07 Sep 2009 11:22:47 +0200 Original-Received: from laptop-147-210-128-170.labri.fr ([147.210.128.170]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 Sep 2009 11:22:47 +0200 Original-Received: from ludo by laptop-147-210-128-170.labri.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 Sep 2009 11:22:47 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 86 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: laptop-147-210-128-170.labri.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 21 Fructidor an 217 de la =?iso-8859-1?Q?R=E9volutio?= =?iso-8859-1?Q?n?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:NyTBQCK+qSgH1l4aSXgHOGpwqEI= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:9276 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Hi Ken, Ken Raeburn writes: > BTW, the bdw-gc branch with my patch and SCM_DEBUG==1 still fails > tests on my Mac. > > In guardians.c, line 169, SCM_CAR is applied to a non-pair: > > Running popen.test > Running ports.test > > scm_error_pair_access > Non-pair accessed with SCM_C[AD]R: `ERROR: In procedure symbol->string: > ERROR: Wrong type argument in position 1 (expecting symbol): > # Does that mean it’s this whole string that’s accessed with SCM_C[AD]R? > I use a modified scm_error_pair_access() that prints the function's > name (as seen above) Hmm, I don’t see the function name, except ‘symbol->string’ above, but I’d expect it to be part of the string that’s accessed as a pair. > and then sleeps a while, so I can attach gdb and get this stack trace > before letting it resume: > > #0 0x9487546e in __semwait_signal () > #1 0x948752ef in nanosleep$UNIX2003 () > #2 0x948cae71 in sleep$UNIX2003 () > #3 0x002ea943 in scm_error_pair_access (non_pair=0x11d9180) at ../../ > libguile/pairs.c:50 > #4 0x002c8e35 in finalize_guarded (ptr=0x11d91f0, > finalizer_data=0x11d9188) at ../../libguile/guardians.c:169 I cannot reproduce it here without SCM_DEBUG but with this simple patch instead: --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/libguile/guardians.c b/libguile/guardians.c index 580e212..ec00df6 100644 --- a/libguile/guardians.c +++ b/libguile/guardians.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998,1999,2000,2001, 2006, 2008 Free Software Foundation, Inc. +/* Copyright (C) 1998,1999,2000,2001, 2006, 2008, 2009 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -159,13 +159,16 @@ finalize_guarded (GC_PTR ptr, GC_PTR finalizer_data) g->zombies = zombies; } - if (proxied_finalizer != SCM_BOOL_F) + if (scm_is_true (proxied_finalizer)) { /* Re-register the finalizer that was in place before we installed this one. */ GC_finalization_proc finalizer, prev_finalizer; GC_PTR finalizer_data, prev_finalizer_data; + if (!scm_is_pair (proxied_finalizer)) + abort (); + finalizer = (GC_finalization_proc) SCM2PTR (SCM_CAR (proxied_finalizer)); finalizer_data = SCM2PTR (SCM_CDR (proxied_finalizer)); --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Any hints? Ludo’. --=-=-=--