* [bug #15770] segfault in guile 1.7.91
@ 2006-02-16 15:54 anonymous
2006-02-21 21:50 ` Kevin Ryde
0 siblings, 1 reply; 2+ messages in thread
From: anonymous @ 2006-02-16 15:54 UTC (permalink / raw)
URL:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=15770>
Summary: segfault in guile 1.7.91
Project: Guile
Submitted by: None
Submitted on: Чтв 16.02.2006 at 15:54
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
_______________________________________________________
Details:
It is unable to call callback from thread in guile extension.
module:
--
#include <libguile.h>
#include <pthread.h>
pthread_t dbus_tid;
void *start_test(void* user_data)
{
scm_call_0((void*)(user_data));
}
SCM scm_test_thread(SCM arg)
{
pthread_create(&dbus_tid,NULL,start_test,arg);
}
void scm_init_test(void)
{
scm_c_define_gsubr("test-thread", 1, 0,
0,(SCM(*)())scm_test_thread);
}
--
testcase:
--
(dynamic-call "scm_init_test" (dynamic-link "libguile-thread.so"))
(define cb (lambda() (write "zzz!\n")))
(test-thread cb)
(pause)
how to reproduce:
$gcc -fpic -lpthread dbus.c -shared -o lguile-thread.so
---
guile
guile> (dynamic-call "scm_init_test" (dynamic-link "libguile-thread.so"))
guile> (define cb (lambda() (write "zzz!\n")))
guile> (test-thread cb)
Segmentation fault
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=15770>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-02-21 21:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-16 15:54 [bug #15770] segfault in guile 1.7.91 anonymous
2006-02-21 21:50 ` Kevin Ryde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).