load-shared-object crash on #+(and :sb-thread :darwin)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
SBCL on Darwin crashes when trying to load certain shared library.
Test case: (load-shared-object #p"/usr/
From google it seems that dlopen/
$ sbcl --version
SBCL 1.0.57.
$ uname -a
Darwin pb-d-128-
* *features*
(:QUICKLISP :ASDF2 :ASDF :ASDF-UNICODE :SB-THREAD :ANSI-CL :COMMON-LISP :SBCL
:SB-DOC :SB-TEST :SB-LDB :SB-PACKAGE-LOCKS :SB-UNICODE :SB-EVAL
:SB-SOURCE-
:OS-PROVIDES-
:OS-PROVIDES-
:INLINE-CONSTANTS :FLOAT-EQL-VOPS :COMPLEX-FLOAT-VOPS :CYCLE-COUNTER
:ALIEN-CALLBACKS :STACK-
:STACK-
:UNWIND-
:C-STACK-
:UD2-BREAKPOINTS :MACH-EXCEPTION
:DARWIN9-OR-BETTER :INODE64 :X86-64)
Excerpt from ~/Library/
Process: sbcl [16293]
Path: /usr/local/bin/sbcl
Identifier: sbcl
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: Emacs [14491]
Date/Time: 2012-06-17 21:16:14.255 +0200
OS Version: Mac OS X 10.6.8 (10K549)
Report Version: 6
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread: 7
(...)
Thread 7 Crashed:
0 com.apple.
1 dyld 0x00007fff5fc0d5ce ImageLoaderMach
2 dyld 0x00007fff5fc0d607 ImageLoaderMach
3 dyld 0x00007fff5fc0bcec ImageLoader:
4 dyld 0x00007fff5fc0bc9d ImageLoader:
5 dyld 0x00007fff5fc0bc9d ImageLoader:
6 dyld 0x00007fff5fc0bda6 ImageLoader:
7 dyld 0x00007fff5fc08fbb dlopen + 573
Interrupting the main thread is most emphatically *not* a good idea, least of all in the standard runtime. There has been some talk of reserving the main thread for book keeping tasks like loading shared libraries, but nothing concrete. In the meantime, I suggest you just load the library from the bare REPL (i.e. *inferior-lisp* in SLIME).