unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* Problem with apply-frame trap in 1.6 and 1.7
@ 2004-11-03 18:32 Neil Jerram
  2004-11-04 15:57 ` Marius Vollmer
  0 siblings, 1 reply; 8+ messages in thread
From: Neil Jerram @ 2004-11-03 18:32 UTC (permalink / raw)
  Cc: Marius Vollmer

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-12-17 11:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-03 18:32 Problem with apply-frame trap in 1.6 and 1.7 Neil Jerram
2004-11-04 15:57 ` Marius Vollmer
2004-11-04 20:58   ` Neil Jerram
2004-12-15 17:06     ` Marius Vollmer
2004-12-15 17:12       ` Marius Vollmer
2004-12-15 17:29         ` Neil Jerram
2004-12-17  0:07           ` Neil Jerram
2004-12-17 11:20             ` Marius Vollmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).