bugGuile - Bugs: bug #15770, segfault in guile 1.7.91

 
 

bug #15770: segfault in guile 1.7.91

Submitter:  None
Submitted:  Thu 16 Feb 2006 03:54:39 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Invalid
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 21 Feb 2006 09:50:41 PM UTC, comment #1: 

Answered by Ken Raeburn on the guile-devel list (missing scm_guile_init).

Kevin Ryde <kryde>
Group Member
Thu 16 Feb 2006 03:54:39 PM UTC, original submission:  

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


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-02-21 kryde StatusNone Invalid
    Open/ClosedOpen Closed

Back to the top

Powered by Savane 3.13-bb6a.
Corresponding source code