[Openmcl-devel] Missing header(s) for OpenGL FFI?

Gary Byers gb at clozure.com
Sat Aug 12 22:48:19 PDT 2006

On Sat, 12 Aug 2006, Gary Byers wrote:

> On Sat, 12 Aug 2006, Phil wrote:
>> So it sounds like for the time being the workaround is to revert to the old
>> interfaces until a fix is available?

It seems that you can actually provoke the bug just by doing:

? (require "COCOA")
? (%int-to-ptr #xc000000) ; other values whose addresses are greater
                           ; than the highest library address in use
 			  ; will also fail.

The set of interfaces you're using doesn't have too much to do with
this bug, but it might (in some way) somehow affect where #_malloc
and things like that decide to put things.  That probably isn't easy
to predict, and of course this shouldn't crash.

In the file "ccl:examples;objc-runtime.lisp", there's a function
called POINTER-IN-CFSTRING-SECTION-P; it's defined within a LET*
along with a few other functions.  It starts out by doing:

     (let* ((addr (%ptr-to-int ptr))
            (min 0)
            (max (length cfstring-sections-vector)))

MAX really wants to be the index of the last element instead of the
length of the vector, so the last binding should be something like:

            (max (1- (length cfstring-sections-vector))))

More information about the Openmcl-devel mailing list