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

Ralf Stoye stoye at stoye.com
Fri Oct 7 13:03:23 UTC 2016


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 ;-)
ccl Versions used: 1.11-r16796M (LinuxARM32) & 1.11-r16635 (LinuxX8664)
You'll find the code i run at the end of this mail (problem.lisp)
It should output some html. The "bad" thing is the call to 
table-of-contents which inserts some links and a table into the document 
structure.
I tried proclaiming safe optimizations (speed 0, safety & debug 3...) 
but to no avail (don't know how to prevent local optimize declarations 
inside the used libraries, any hints on that?)

So here is what should happen (and does in SBCL):
[rs at astreamer ~]$ sbcl --no-sysinit --no-userinit --load problem.lisp
This is SBCL 1.3.1,...
To load "cl-markdown":
   Load 1 ASDF system:
     cl-markdown
; Loading "cl-markdown"
.....
<a name='table-of-contents' id='table-of-contents'></a>
<div class='table-of-contents'>
<h1>Contents</h1><h1><a href='#header1-1' title='Headline 1'> Headline 1 
</a></h1><h2> <a href='#header2-3' title='headline 1.1'> headline 1.1 
</a></h2><h2> <a href='#header2-4' title='headline 1.2'> headline 1.2 
</a></h2><h1> <a href='#header1-6' title='Headline 2'> Headline 2 
</a></h1><h2> <a href='#header2-7' title='Headline 2.1'> Headline 2.1 
</a></h2>
</div>
   <a name='header1-1' id='header1-1'></a><h1>Headline 1</h1><p>some 
text </p><a name='header2-3' id='header2-3'></a><h2>headline 1.1</h2><a 
name='header2-4' id='header2-4'></a><h2>headline 1.2</h2><p>more text 
</p><a name='header1-6' id='header1-6'></a><h1>Headline 2</h1><a 
name='header2-7' id='header2-7'></a><h2>Headline 2.1</h2><p>last line </p>
* (SB-EXT:EXIT)


Using ccl the following happens:
[rs at astreamer ~]$ ccl -n -l problem.lisp
To load "cl-markdown":
   Load 1 ASDF system:
     cl-markdown
; Loading "cl-markdown"

 > Error: Array index -20 out of bounds for #<SIMPLE-VECTOR 13> .
 > While executing: ARRAY-ELEMENT-TYPE, in process listener(1).
 > Type :GO to continue, :POP to abort, :R for a list of available restarts.
 > If continued: Skip loading "problem.lisp"
 > Type :? for other options.
1 > (:B)
Don't know how to find slots of 0
1 >


---------------------------------------------------------------------
;;; problem.lisp
(load #P"~/quicklisp/setup.lisp")
(ql:quickload :cl-markdown)
(in-package :cl-markdown)
(markdown "
{table-of-contents :depth 2  :start 1 :label \"Contents\"}

# Headline 1

some text

## headline 1.1

## headline 1.2

more text

# Headline 2

## Headline 2.1

last line
" :stream *standard-output*)


More information about the Openmcl-devel mailing list