[cffi-devel] null-pointer, *INLINE-EXPANSION-LIMIT* exceeded

Luís Oliveira luismbo at gmail.com
Thu May 22 04:01:26 UTC 2008


On Thu, May 22, 2008 at 2:59 AM, Luís Oliveira <luismbo at gmail.com> wrote:
> However, 200 inline expansions in one
> function does seem like a lot at first sight; perhaps you should
> investigate why that's happening.

Your WITH-POINTER-TO-ARRAYS macro seems to be the culprit. It has a
big expansion containing at least 31 inlineable calls to INC-POINTER,
31 to FOREIGN-FREE, 31 to %FOREIGN-ALLOC and for some reason its body
is repeated 32 times. Since you have NULL-POINTER twice in your body,
I count 157 inlineable calls so far. That's pretty close to the 200
limit and I'm sure there are other calls I'm missing.

In case it helps, I used SB-CLTL2:MACROEXPAND-ALL and the function
below to figure out those numbers.

  (defun tree-count (x tree)
    (loop for el in tree sum
          (if (atom el)
              (if (eql el x) 1 0)
              (tree-count x el))))

-- 
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/



More information about the cffi-devel mailing list