From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.bugs Subject: Problem with apply-frame trap in 1.6 and 1.7 Date: Wed, 03 Nov 2004 18:32:22 +0000 Message-ID: <41892436.3030401@ossau.uklinux.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1099506835 26626 80.91.229.6 (3 Nov 2004 18:33:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 3 Nov 2004 18:33:55 +0000 (UTC) Cc: Marius Vollmer Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed Nov 03 19:33:44 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CPPx2-0004bC-00 for ; Wed, 03 Nov 2004 19:33:44 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CPQ58-0006YD-TU for guile-bugs@m.gmane.org; Wed, 03 Nov 2004 13:42:06 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CPQ54-0006W1-3M for bug-guile@gnu.org; Wed, 03 Nov 2004 13:42:02 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CPQ53-0006VE-E8 for bug-guile@gnu.org; Wed, 03 Nov 2004 13:42:01 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CPQ52-0006V4-PT for bug-guile@gnu.org; Wed, 03 Nov 2004 13:42:01 -0500 Original-Received: from [80.84.72.33] (helo=mail3.uklinux.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CPPwh-0003QT-FK for bug-guile@gnu.org; Wed, 03 Nov 2004 13:33:23 -0500 Original-Received: from laruns (host81-130-97-48.in-addr.btopenworld.com [81.130.97.48]) by mail3.uklinux.net (Postfix) with ESMTP id CC33D40A035; Wed, 3 Nov 2004 18:33:21 +0000 (UTC) Original-Received: from ossau.uklinux.net (laruns [127.0.0.1]) by laruns (Postfix) with ESMTP id 4223C6FA02; Wed, 3 Nov 2004 18:32:23 +0000 (GMT) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 Debian/1.5-3 X-Accept-Language: en Original-To: bug-guile@gnu.org 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: main.gmane.org gmane.lisp.guile.bugs:1956 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.bugs:1956 Working on breakpoints for 1.6.x, I just discovered that the following ENTER_APPLY trap code in eval.c goes into a tight busy loop if (debug-enable 'trace) and (trap-set! apply-frame-handler non-#f). if (CHECK_APPLY && SCM_TRAPS_P)\ if (SCM_APPLY_FRAME_P || (SCM_TRACE_P && PROCTRACEP (proc)))\ This is because PROCTRACEP uses scm_procedure_property, which itself uses apply if proc is not a closure. I think the fix (which works for me in 1.6.5) is to redefine PROCTRACEP to use a more targeted function, like this: #define PROCTRACEP(x) closure_traced_p (x) SCM closure_traced_p (SCM p) { if (!SCM_CLOSUREP (p)) return 0; return SCM_NIMP (scm_sloppy_assq (scm_sym_trace, SCM_PROCPROPS (p))); } Thoughts? Once the fix is agreed, I suggest that this should go into 1.6.x as well as HEAD. Regards, Neil _______________________________________________ Bug-guile mailing list Bug-guile@gnu.org http://lists.gnu.org/mailman/listinfo/bug-guile