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

 
 

bug #15770: segfault in guile 1.7.91

Submitted by:  None
Submitted on:  Thu 16 Feb 2006 03:54:39 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Tue 21 Feb 2006 09:50:41 PM UTCkrydeStatusNone=>Invalid
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1