unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: anonymous <savannah-bounces@gnu.org>
Subject: [bug #15770] segfault in guile 1.7.91
Date: Thu, 16 Feb 2006 15:54:39 +0000	[thread overview]
Message-ID: <20060216-155439.sv0.20292@savannah.gnu.org> (raw)
In-Reply-To: 


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


             reply	other threads:[~2006-02-16 15:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-16 15:54 anonymous [this message]
2006-02-21 21:50 ` [bug #15770] segfault in guile 1.7.91 Kevin Ryde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060216-155439.sv0.20292@savannah.gnu.org \
    --to=savannah-bounces@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).