projects
/
sbcl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a24e6c6
)
darwin: dladdr can deadlock the GC
author
Nikodemus Siivola
<nikodemus@random-state.net>
Wed, 7 Dec 2011 13:41:45 +0000
(15:41 +0200)
committer
Nikodemus Siivola
<nikodemus@random-state.net>
Wed, 7 Dec 2011 17:29:25 +0000
(19:29 +0200)
Needs to be always called inside WITHOUT-GCING since it grabs locks, and is
/sometimes/ called inside WITHOUT-GCING.
src/code/foreign.lisp
patch
|
blob
|
history
diff --git
a/src/code/foreign.lisp
b/src/code/foreign.lisp
index
8c32729
..
a735e76
100644
(file)
--- a/
src/code/foreign.lisp
+++ b/
src/code/foreign.lisp
@@
-139,7
+139,10
@@
if the symbol isn't found."
(symbol-address unsigned)))
(dladdr (function unsigned unsigned (* (struct dl-info)))
:extern "dladdr"))
- (let ((err (alien-funcall dladdr addr (addr info))))
+ (let ((err (without-gcing
+ ;; On eg. Darwin GC can could otherwise interrupt
+ ;; the call while dladdr is holding a lock.
+ (alien-funcall dladdr addr (addr info)))))
(if (zerop err)
nil
(slot info 'symbol))))