[Openmcl-devel] Segfault.

David Brown lisp at davidb.org
Sun Feb 10 09:49:31 PST 2008


I'm running ccl on x86_64 linux, built from SVN source (the 'source')
directory.  The code snippet below causes a segfault, but doesn't if run in
the July snapshot.

(let ((shared1 (make-array 8 :element-type '(unsigned-byte 8)))
       (shared2 (make-array 8 :element-type '(unsigned-byte 8))))
   (ccl:with-pointer-to-ivector (%shared1 shared1)
     (ccl:with-pointer-to-ivector (%shared2 shared2)
       (%stack-block ((stacky 8))
         (format t "~A~%~A~%~A~%" %shared1 %shared2 stacky)))))

I can easily work around it by moving the %stack-block before the
with-pointer-to-ivector calls, so this isn't critical or anything.  It does
require the two calls to with-pointer-to-ivector.

When working, the messages printing, are something like:

    #<A Foreign Pointer [stack-allocated] #x300040F1C148>
    #<A Foreign Pointer [stack-allocated] #x300040F1C138>
    #<A Foreign Pointer [stack-allocated] #x40262DB0>

Should the pointer from with-pointer-to-ivector be marked as
'stack-allocated' even though it is not?

Thanks,
David Brown



More information about the Openmcl-devel mailing list