From: Cedric Cellier <rixed@happyleptic.org>
To: guile-user@gnu.org
Subject: Latest guile 1.9 segfault in GC
Date: Tue, 17 Aug 2010 11:09:11 +0200 [thread overview]
Message-ID: <20100817090911.GA27087@securactive.net> (raw)
% cat main.c
#include <stdlib.h>
#include <pthread.h>
#include <libguile.h>
pthread_t dumper;
static void *call_gc(void *null)
{
scm_gc();
return NULL;
}
void *thread_dumper(void *null)
{
scm_with_guile(call_gc, NULL);
return NULL;
}
int main(void)
{
while (1) {
pthread_create(&dumper, NULL, thread_dumper, NULL);
for (;;) sleep(1);
}
return EXIT_SUCCESS;
}
% make
gcc -O0 -g3 -ggdb3 -I/usr/local/include/guile/2.0 -I/usr/local/include main.c -L/usr/local/lib -lguile-2.0 -lgc -lunistring -lcrypt -lm -lltdl -lpthread -o main
% ./main
zsh: segmentation fault (core dumped) ./main
% gdb main core
...
(gdb) bt
#0 0x00007f184630b698 in GC_is_black_listed (h=0x24ea000, len=4096) at blacklst.c:233
#1 0x00007f1846308c15 in GC_allochblk_nth (sz=512, kind=1, flags=0, n=14, may_split=1) at allchblk.c:690
#2 0x00007f1846308989 in GC_allochblk (sz=512, kind=1, flags=0) at allchblk.c:625
#3 0x00007f18463185f2 in GC_new_hblk (gran=32, kind=1) at new_hblk.c:191
#4 0x00007f184630b090 in GC_allocobj (gran=32, kind=1) at alloc.c:1290
#5 0x00007f1846311010 in GC_generic_malloc_inner (lb=496, k=1) at malloc.c:126
#6 0x00007f1846310fd9 in GC_generic_malloc_inner (lb=496, k=1) at malloc.c:121
#7 0x00007f18463111b4 in GC_generic_malloc (lb=496, k=1) at malloc.c:166
#8 0x00007f1846311644 in GC_core_malloc (lb=496) at malloc.c:276
#9 0x00007f184631d19f in GC_malloc (bytes=496) at thread_local_alloc.c:161
#10 0x00007f18465f6d6e in scm_gc_malloc (size=496, what=0x7f18466d8cd0 "thread") at gc-malloc.c:189
#11 0x00007f184666f0b3 in guilify_self_1 (base=0x7f1844af9d88) at threads.c:325
#12 0x00007f1846671a3e in scm_threads_prehistory (base=0x7f1844af9d88) at threads.c:1924
#13 0x00007f184660b9a5 in scm_i_init_guile (base=0x7f1844af9d88) at init.c:442
#14 0x00007f184666f718 in scm_i_init_thread_for_guile (base=0x7f1844af9d88, parent=0x0) at threads.c:582
#15 0x00007f184666f8c7 in scm_i_with_guile_and_parent (func=0x4007f4 <call_gc>, data=0x0, parent=0x0) at threads.c:730
#16 0x00007f184666f866 in scm_with_guile (func=0x4007f4 <call_gc>, data=0x0) at threads.c:713
#17 0x0000000000400827 in thread_dumper (null=0x0) at main.c:15
#18 0x00007f184631e66e in GC_inner_start_routine (sb=0x7f1844af9e80, arg=0x24e8fc0) at pthread_support.c:1216
#19 0x00007f1846317d97 in GC_call_with_stack_base (fn=0x7f184631e572 <GC_inner_start_routine>, arg=0x24e8fc0) at misc.c:1361
#20 0x00007f184631e6df in GC_start_routine (arg=0x24e8fc0) at pthread_support.c:1247
#21 0x00007f18457079ca in start_thread (arg=<value optimized out>) at pthread_create.c:300
#22 0x00007f18454646fd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#23 0x0000000000000000 in ?? ()
% guile
GNU Guile 1.9.11.259-252f
Which I just compiled from commit 252f9f187ac8608ebcbf513bbbda49fc085f3a52
Any idea welcome.
next reply other threads:[~2010-08-17 9:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-17 9:09 Cedric Cellier [this message]
2010-08-17 13:08 ` Latest guile 1.9 segfault in GC Cedric Cellier
2010-08-18 14:07 ` Ludovic Courtès
2010-08-17 14:08 ` Cedric Cellier
2010-08-18 14:12 ` Ludovic Courtès
2010-08-18 16:16 ` Andy Wingo
2010-08-21 1:42 ` rixed
2010-08-23 12:47 ` Cedric Cellier
2010-08-24 16:31 ` Ludovic Courtès
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=20100817090911.GA27087@securactive.net \
--to=rixed@happyleptic.org \
--cc=guile-user@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).