[Openmcl-devel] how to debug this? (1 > (:B) => Don't know how to find slots of 0

Gary Byers gb at clozure.com
Wed Oct 12 13:56:17 UTC 2016


Given that there is no lomger a cl-markdown project on common-lisp.net 
(there may have once been) amd the fact that quicklisp tries to build 
cl-markdown by installing a tarball contaiinng Darcs netainfolrmation 
from 2008 or so. I suspect that the problem here hss more to do with 
that bitrot than it has to do with handling of OPTIMIZE declarations.

On 10/09/2016 05:16 PM, R. Matthew Emerson wrote:
>
>> On Oct 7, 2016, at 11:25 AM, Pascal J. Bourguignon <pjb at informatimago.com> wrote:
>>
>> Ralf Stoye <stoye at stoye.com> writes:
>>
>>> Hi,
>>> at first: sorry if this post is a duplicate, the first mail doesn't
>>> seem to reach the list.
>>>
>>> Using cl-markdown, i encounter a bug which even prevents a
>>> backtrace. sometimes i'm thrown into the kernel debugger. In any case
>>> the data is substantially damaged and i am not comfortable debugging
>>> cl-containers and other involved libraries.
>>> Since the code runs seamless in sbcl it may be some ccl problem (i
>>> understand that often some vague interpretation of the specs causes
>>> things like that ;-)
>>>> Error: Array index -20 out of bounds for #<SIMPLE-VECTOR 13> .
>>
>> Most probably, you'll discover it's not a ccl problem.
>>
>> Start by grepping all the sources you load for "optimize", and remove
>> all declaration, declaimation and proclaimation of optimize.
>>
>> Then (declaim (optimize (space 0) (speed 0) (debug 3) (safety 3)))
>> and remove the compiled binaries, and recompile and reload the sources.
>>
>> ccl will most probably tell you right away where the problem is.
>
> Another approach you might try is to set ccl:*load-preserves-optimization-settings* to t, then remove fasls and recompile.
>
> This setting makes (declaim (optimize ...)) effectively file local.  When the setting is nil (as it is by default), (declaim (optimize ...)) has load-time effects.
>
> You can use (declaration-information 'optimize) to see what the current optimize settings are.
>
> The default, of course, is ((SPEED 1) (SAFETY 1) (COMPILATION-SPEED 1) (SPACE 1) (DEBUG 1)).
>
> If you've loaded some file that contains (declaim (optimize (safety 0))) or something equally ill-advised, (declaration-information 'optimize) will show different values.
>
> To belabor the point, you could do something like this:
>
> (declaration-information 'optimize)
> (ql:quickload :some-system)
> (declaration-information 'optimize)
>
> If output of declaration-information changes after loading the system, some file is messing around with global optimization settings and should be fixed.
>
> Sometimes
>
> (eval-when (:compile-toplevel)
>   (declaim (optimize ...))
>
> is what is actually meant.
>
>
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> https://lists.clozure.com/mailman/listinfo/openmcl-devel
>


More information about the Openmcl-devel mailing list