Opened 5 years ago

Closed 5 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:

Description

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

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

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 "libmain.so" :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)

libmain64.so (4.1 KB) - added by veritas 5 years ago.
libmain32.so (4.1 KB) - added by veritas 5 years ago.

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by veritas

Changed 5 years ago by veritas

comment:1 Changed 5 years ago by gb

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

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

Note: See TracTickets for help on using tickets.