[Openmcl-devel] new snapshot archives (finally)

Gary Byers gb at clozure.com
Thu Sep 7 22:44:10 UTC 2006


You can get the same error without SLIME's involvement:

Welcome to OpenMCL Version 1.1-pre-060907 (DarwinPPC32)!
? 
? (first)
> Error: Too few arguments in call to #<Compiled-function FIRST #x8060836>:
>        0 arguments provided, at least 1 required. 
> While executing: FIRST, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
1 > :b
(F0135BB0) : 0 (FIRST ?) 0
> Error: value 0 is not of the expected type FUNCTION.
> While executing: %LFUN-NAME-STRING, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
2 >

The bug seems to be in the function CCL::CFP-LFUN, the PPC version
of which is now in "ccl:lib;ppc-backtrace.lisp"; that version does
indeed neglect to check for something that the 1.0 version handled.
If you replace it with:

(defun cfp-lfun (p)
   (if (fake-stack-frame-p p)
     (let* ((fn (%fake-stack-frame.fn p))
            (lr (%fake-stack-frame.lr p)))
       (if (and (typep fn 'function)
                (typep lr 'fixnum))
         (values fn lr)
         (values nil nil)))
     (%cfp-lfun p)))

then neither SLIME's backtrace nor the lisp's own should choke on this
case.



On Thu, 7 Sep 2006, Phil wrote:

> I'm not sure if this was an intentional change or not but there
> appear to be some differences in error handling with 1.1.  This
> results in SLIME not being able to handle many error conditions that
> it used to.  I did a quick comparison to confirm....
>
> In 1.1:
> ? (first)
> > Error: Too few arguments in call to #<Compiled-function FIRST
> #x804DDCE>:
> >        0 arguments provided, at least 1 required.
> > While executing: FIRST, in process listener(1).
> > Type :POP to abort, :R for a list of available restarts.
> > Type :? for other options.
> 1 >
>
> In 1.0 the error reported was slightly different:
> ? (first)
> > Error in process listener(1): Too few arguments in call to
> #<Compiled-function FIRST #x804A4AE>: 0 provided, at least 1 required.
> > While executing: FIRST
> > Type :POP to abort.
> Type :? for other options.
> 1 >
>
> The result in SLIME w/ 1.1 is that the error is not captured by the
> Slime debugger:
> CL-USER> (first)
> > Error: value 0 is not of the expected type (SATISFIES FUNCTIONP).
> > While executing: CCL::LFUN-BITS, in process repl-thread(8).
> > Type :POP to abort, :R for a list of available restarts.
> > Type :? for other options.
> 1 >
>
> which is different than the behavior w/ 1.0:
> CL-USER> (first)
> Too few arguments in call to #<Compiled-function FIRST #x804A136>: 0
> provided, at least 1 required.
>    [Condition of type CCL::TOO-FEW-ARGUMENTS]
>
> Restarts:
>   0: [ABORT-REQUEST] Abort handling SLIME request.
>   1: [ABORT-BREAK] Reset this process
>   2: [ABORT] Kill this process
>
> Backtrace:
>   0: (FIRST)
>   1: (CCL::CALL-CHECK-REGS 'FIRST)
>  --more--
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>



More information about the Openmcl-devel mailing list