From: ludo@gnu.org (Ludovic Courtès)
To: Mike Gran <spk121@yahoo.com>
Cc: 13611@debbugs.gnu.org
Subject: bug#13611: SEGV during SMOB GC
Date: Tue, 05 Feb 2013 11:07:51 +0100 [thread overview]
Message-ID: <87y5f3t6o8.fsf@gnu.org> (raw)
In-Reply-To: <1359838300.89158.YahooMailNeo@web120405.mail.ne1.yahoo.com> (Mike Gran's message of "Sat, 2 Feb 2013 12:51:40 -0800 (PST)")
[-- Attachment #1: Type: text/plain, Size: 912 bytes --]
Hi Mike,
Mike Gran <spk121@yahoo.com> skribis:
> This gives
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0xb7d98b40 (LWP 20488)]
> 0xb7f251ab in smob_mark (addr=0x8608ff0, mark_stack_ptr=0xb7d90308,
> mark_stack_limit=0xb7d982f0, env=0) at smob.c:325
> 325 SCM_I_CURRENT_THREAD->current_mark_stack_ptr = mark_stack_ptr;
>
> Here's what's happening internally. When Guile starts up, it creates 3
> threads
> * Initial thread
> * GC thread from scm_storage_prehistory GC_INIT()
> * signal delivery thread
>
> That second thread is the one from which automatic garbage collection
> occurs. The way that thread gets created, it has an
> scm_i_current_thread == NULL, apparently.
Is there any chance that you’re using a GC 7.3 pre-release?
There was a similar report on IRC, and the fix appears to be:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 716 bytes --]
--- a/libguile/smob.c
+++ b/libguile/smob.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2003, 2004, 2006, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2003, 2004, 2006, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -318,7 +318,7 @@ smob_mark (GC_word *addr, struct GC_ms_entry *mark_stack_ptr,
mark_stack_ptr,
mark_stack_limit, NULL);
- if (scm_smobs[smobnum].mark)
+ if (scm_smobs[smobnum].mark && SCM_I_CURRENT_THREAD != NULL)
{
SCM obj;
[-- Attachment #3: Type: text/plain, Size: 72 bytes --]
(Note that on 2.0 SMOB mark procedures are unnecessary.)
Ludo’.
next prev parent reply other threads:[~2013-02-05 10:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-02 20:51 bug#13611: SEGV during SMOB GC Mike Gran
2013-02-05 10:07 ` Ludovic Courtès [this message]
2013-02-05 16:29 ` Mike Gran
2013-02-05 16:41 ` Ludovic Courtès
2013-02-05 17:04 ` Mike Gran
2013-02-05 21:13 ` Ludovic Courtès
2013-02-06 4:56 ` Mike Gran
2013-03-01 17:02 ` Ludovic Courtès
2013-03-13 12:42 ` Andy Wingo
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=87y5f3t6o8.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=13611@debbugs.gnu.org \
--cc=spk121@yahoo.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).