[Openmcl-devel] CCL bug?

Gary Byers gb at clozure.com
Mon Mar 15 20:11:47 PDT 2010


What does

? (ccl:declaration-information 'optimize nil)

return in the environment where no typechecking occurs ?

Normally, that should return something like:

((SPEED 1) (SAFETY 1) (COMPILATION-SPEED 1) (SPACE 1) (DEBUG 1))

and the (SETF CDR) in your DOLIST form should typecheck when
compiled under those (default) settings; incorrect code might bus error
or otherwise misbehave if compiled with more aggressive optimization
settings in effect.


On Tue, 16 Mar 2010, Sudhir Shenoy wrote:

> I get a "Bus error" in CCL PPC-32 as well as X86-64 with the following
> code fragment:
>
> Welcome to Clozure Common Lisp Version 1.5-dev-r13529M-trunk
> (DarwinPPC32)!
> ? (defvar x nil)
> X
> ? (dolist (i '(1 2 3 4 5))
>       (setf (cdr (assoc i x)) 1))
> Bus error
>
> However, without the loop, it signals an error as expected:
>
> Welcome to Clozure Common Lisp Version 1.5-dev-r13529M-trunk
> (DarwinPPC32)!
> ? (defvar x nil)
> X
> ? (setf (cdr (assoc 1 x)) 1)
> > Error: value NIL is not of the expected type CONS.
> > While executing: CCL::SET-CDR, in process listener(1).
> > Type :POP to abort, :R for a list of available restarts.
> > Type :? for other options.
> 1 >
>
> I am not sure if this is a real bug or simply a result of
> optimizations (since the code is obviously wrong) so I am reporting it
> for whatever it is worth.
>
> Cheers
> Sudhir
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>



More information about the Openmcl-devel mailing list