[Openmcl-devel] CCL bug?

Sudhir Shenoy sshenoy at gol.com
Mon Mar 15 21:34:00 PDT 2010


Gary,

You are right. I get
((SPEED 3) (SAFETY 0) (COMPILATION-SPEED 0) (SPACE 1) (DEBUG 1))
in a fresh CCL instance. However, executing "ccl --no-init" gives me
((SPEED 1) (SAFETY 1) (COMPILATION-SPEED 1) (SPACE 1) (DEBUG 1))

I am not setting the speed/safety settings explicitly in my ccl- 
init.lisp. However, some libraries that are autoloaded on startup are  
setting them.

I guess it is correct to assume that I need to explicitly set (speed  
1), (safety 1) after loading the libraries. I was under the impression  
that the compiler settings only affect the compilation units (files)  
and should reset automatically. However, looking at the Hyperspec now,  
it does say that it is unspecified if declaim-ed declarations persist  
after compilation ...

Thanks
Sudhir

On Mar 16, 2010, at 12:11 PM, Gary Byers wrote:

> 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