Custom Query (1030 matches)
Results (616 - 618 of 1030)
| Ticket | Resolution | Summary | Owner | Reporter |
|---|---|---|---|---|
| #1052 | fixed | Foreign callbacks into a thread which is about to die | ||
| Description |
Qt-webkit uses pthread_key_create with a destructor, and inside that destructor it calls back into lisp. But apparently lisp-thread infrastructure is already dismantled when the destructor is called. Here's a test-case: // gcc test.c -lpthread -shared -o test.so -fPIC
#include <pthread.h>
void finish(void* arg) {
int (*f)(int, int) = (int(*)(int,int))arg;
f(1,2);
}
int test (int (*f)(int, int))
{
pthread_key_t key;
pthread_key_create(&key, finish);
pthread_setspecific(key, f);
}
(eval-when (:compile-toplevel :load-toplevel :execute)
(asdf:load-system :cffi))
(cffi:load-foreign-library "/tmp/test.so")
(cffi:defcfun (test-c "test") :int
(function :pointer))
(cffi:defcallback (test-callback)
:short ((a :int) (b :int))
(print (list a b))
(finish-output)
1)
(defun test ()
(ccl:process-run-function
nil
(lambda () (test-c (cffi:get-callback 'test-callback)))))
(test)
One idea I had for fixing this is creating a new thread-key with a value of 1. The order of destructor execution is not specified, but it's specified that they are called PTHREAD_DESTRUCTOR_ITERATIONS times if the key still has a value. So, when the destructor is called the first time, it'll just set its value to 0 and do nothing, then when it's called with 0, do thread clean up. That way other key destructor will get a chance to be called on the first iteration before the clean up is completed. |
|||
| #1053 | fixed | Not all ASCII control-character abbreviations are recognized | ||
| Description |
(remove-if #'name-char
'((#x00 "Nul") (#x01 "Soh") (#x02 "Stx") (#x03 "Etx") (#x04 "Eot")
(#x05 "Enq") (#x06 "Ack") (#x07 "Bel") (#x08 "Bs") (#x09 "Ht") (#x0A "Lf")
(#x0B "Vt") (#x0C "Ff") (#x0D "Cr") (#x0E "So") (#x0F "Si")
(#x10 "Dle") (#x11 "Dc1") (#x12 "Dc2") (#x13 "Dc3") (#x14 "Dc4")
(#x15 "Nak") (#x16 "Syn") (#x17 "Etb") (#x18 "Can") (#x19 "Em")
(#x1A "Sub") (#x1B "Esc") (#x1C "Fs") (#x1D "Gs") (#x1E "Rs")
(#x1F "Us") (#x20 "Sp") (#x7f "Del"))
:key #'second)
((16 "Dle") (17 "Dc1") (18 "Dc2") (19 "Dc3") (20 "Dc4") (21 "Nak") (22 "Syn") (23 "Etb") (24 "Can") (25 "Em") (32 "Sp")) |
|||
| #1054 | fixed | (equal #p"/" #p"ccl:") returns t | ||
| Description |
Welcome to Clozure Common Lisp Version 1.9-dev-r15596 (DarwinX8664)! ? (equal #p"/" #p"ccl:") T That would seem to be wrong. |
|||
