[Ecls-list] error while compiling: THROW: The catch #:G1 is undefined.

Juan Jose Garcia Ripoll lisp at arrakis.es
Mon Feb 6 02:17:01 UTC 2006


On Thu, 2006-01-19 at 15:40 -0800, Greg Pfeil wrote:
> > On Mon, 2006-01-16 at 09:07 +0100, Peter Van Eynde wrote:
> >> Hello,
> >> 
> >> While compiling a newer version of clc (which does compile on cmucl/sbcl
> >> and an older clisp)  I get the following error. Is there anything I can
> >> do to debug this further? If I try to remove the offending function
> >> the error just moves round. [...]
> >> ;;; Note: Replacing variable G736 by its value #<form VAR 866FE88>
> >> [...]
> >> THROW: The catch #:G1 is undefined.
> >> Broken at COMPILE-FILE.
> 
> Oh, cool. I've been seeing this, too ... Not the _most_ recent CVS, but
> newer than 0.9h.

After a lot of debugging, I found out that this was due to a problem in
SAFE-EVAL. This function was implemented using some "magic" that has
disappeared in recent versions. The fix has been to reimplement
SAFE-EVAL using *DEBUG-HOOK*, a variable that allows one to trap
invocations of the debugger and which SAFE-EVAL uses to cause an
immediate return.

The reason why it took so long is that there is no easy way to implement
SAFE-EVAL using the standard Common-Lisp. SAFE-EVAL also has to protect
ECL against nonlocal jumps outside the function that invoked it.

Furthermore, it was not so easy to figure out that *DEBUG-HOOK* was the
solution. At first I tried with variations of HANDLER-BIND but this has
a horrible problem: if SAFE-EVAL sets up a handler for all conditions,
nested functions have no way to disable these handlers.

Anyway, I committed what I think is a fix. Please have a look at it and
report any problems

Regards,

Juanjo





More information about the ecl-devel mailing list