[Openmcl-devel] how to debug this? (1 > (:B) => Don't know how to find slots of 0
R. Matthew Emerson
rme at clozure.com
Sun Oct 9 16:16:52 PDT 2016
> On Oct 7, 2016, at 11:25 AM, Pascal J. Bourguignon <pjb at informatimago.com> wrote:
> Ralf Stoye <stoye at stoye.com> writes:
>> 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:
If output of declaration-information changes after loading the system, some file is messing around with global optimization settings and should be fixed.
(declaim (optimize ...))
is what is actually meant.
More information about the Openmcl-devel