Opened 6 years ago

Closed 6 years ago

#1182 closed defect (fixed)

CFFI, Mac OS X, shared libraries, crash

Reported by: veritas Owned by:
Priority: critical Milestone:
Component: Foreign Function Interface Version: trunk
Keywords: cffi, mac os x Cc:


$ cat > main.c int a(){return 15;}D

$ gcc -dynamiclib -undefined suppress -flat_namespace -fPIC main.c -o

Can't close shared library. Error is „Error: Shared library not open: "/usr/lib/system/libsystem_c.dylib"“.

(ql:quickload :cffi)

(let (( lib

(cffi:load-foreign-library "" :search-path "/private/tmp/shared/") ))

; (ccl:close-shared-library (cffi::foreign-library-handle lib) ; :completely nil)

(cffi:close-foreign-library lib)


; (cffi:foreign-funcall "a" :int)

cffi is last, ccl is git trunk (i386, x64), Mac OS X 1.9, sbcl (for example) is working (and really unload, so it is proof of dynamic libraries unloading possibility under Darwin). It's a very important feature for me. Please, fix it :)

Attachments (2) (4.1 KB) - added by veritas 6 years ago. (4.1 KB) - added by veritas 6 years ago.

Download all attachments as: .zip

Change History (3)

Changed 6 years ago by veritas

Changed 6 years ago by veritas

comment:1 Changed 6 years ago by gb

  • Resolution set to fixed
  • Status changed from new to closed

(In [16075]) ENSURE-OPEN-SHLIB: test shlib.handle, not (the latter is always null on TWMAOS.)  Fixes ticket:1182 in the trunk.

Note: See TracTickets for help on using tickets.