bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #24554] Pthreads and Stack overflow in guile (reopen bug 20814?) (g


From: Kannan Vijayan
Subject: [bug #24554] Pthreads and Stack overflow in guile (reopen bug 20814?) (guile 1.8.5)
Date: Tue, 14 Oct 2008 01:39:59 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071618 Iceweasel/3.0.1 (Debian-3.0.1-1)

URL:
  <http://savannah.gnu.org/bugs/?24554>

                 Summary: Pthreads and Stack overflow in guile (reopen bug
20814?)  (guile 1.8.5)
                 Project: Guile
            Submitted by: kvijayan
            Submitted on: Tue 14 Oct 2008 01:39:58 AM GMT
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:


I've scoured the web for anything I could be missing with regards to this
bug, including a previous bug report on Savannah dealing with what seems to be
the same issue:

https://savannah.gnu.org/bugs/?func=detailitem&item_id=20814

I have tried to follow these directions, but nothing really seems to work.  I
still get stack overflow errors from guile when doing anything in a new
thread.

The following code is a test case that demonstrates the issue:

/* test.c */
#include <libguile.h>
#include <pthread.h>

static void *thread_1_scm(void *ignore) {
    scm_c_eval_string ("(display (+ 2 33)) (newline)");
    return NULL;
}

static void *thread_1(void *ignore) {
    return scm_with_guile(thread_1_scm, NULL);
}

static void *main_scm(void *ignore)
{
    scm_c_eval_string("(display (+ 1 55)) (newline)");
    pthread_t thr;
    pthread_create(&thr, NULL, thread_1, NULL);
    pthread_join(thr, NULL);
    return NULL;
}

int main(int argc, char **argv) {
    scm_with_guile(main_scm, NULL);
    return 0;
}


I'm compiling as follows:

gcc -o test test.c -lguile -lpthread


The output of this code is:

56
ERROR: Stack overflow


I really don't know what I'm doing wrong here, if anything.  Would appreciate
any help.

Cheers.
-kannan




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?24554>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]