From: Kannan Vijayan <INVALID.NOREPLY@gnu.org>
To: Kannan Vijayan <kannan.vij@gmail.com>, bug-guile@gnu.org
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 [thread overview]
Message-ID: <20081014-013958.sv70242.45488@savannah.gnu.org> (raw)
In-Reply-To:
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/
next reply other threads:[~2008-10-14 1:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-14 1:39 Kannan Vijayan [this message]
2008-10-14 3:05 ` [bug #24554] Pthreads and Stack overflow in guile (reopen bug 20814?) (guile 1.8.5) Kannan Vijayan
2008-10-14 8:53 ` Neil Jerram
2008-10-14 15:07 ` Kannan Vijayan
2008-11-30 18:42 ` Ludovic Courtès
2009-07-20 21:51 ` Ludovic Courtès
-- strict thread matches above, loose matches on Subject: below --
2008-10-14 16:50 dsmich
2008-10-14 21:48 ` Neil Jerram
2008-10-15 18:43 dsmich
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=20081014-013958.sv70242.45488@savannah.gnu.org \
--to=invalid.noreply@gnu.org \
--cc=bug-guile@gnu.org \
--cc=kannan.vij@gmail.com \
/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).