bug-guile
[Top][All Lists]
Advanced

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

Re: Guile 2.0.1: scm_init_guile() broken on Mac OS X 10.6.7


From: Hans Aberg
Subject: Re: Guile 2.0.1: scm_init_guile() broken on Mac OS X 10.6.7
Date: Fri, 20 May 2011 15:39:38 +0200

On 20 May 2011, at 15:10, Andy Wingo wrote:

>>>> On Mac OS X 10.6.7, compiled using Xcode Version 3.2.6 64-bit,
>>>> i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1, scm_init_guile() gives the
>>>> error:
>>>> 
>>>> Failed to get stack base for current thread.
>> ...
>>> As you can see we rely on libgc here, and so this is a libgc bug.  Can
>>> you try a newer libgc, or if that still fails, bring it up on their
>>> list?
>> 
>> On Mac OS X, one must call GC_init() (not necessary on GNU/Linux). Has
>> that dropped out in guile-2.0.1?
> 
> I really have no idea.  As you see in 2.0.1 we rely on libgc for
> detecting stack boundaries in the non-scm_with_guile case, as is
> appropriate I think.  As for GC_init() I don't know, and would be
> surprised if that were the case.

There is a comment in in libguile/gc.c suggesting it isn't called, there is:

void
scm_storage_prehistory ()
{
  GC_all_interior_pointers = 0;
  GC_set_free_space_divisor (scm_getenv_int ("GC_FREE_SPACE_DIVISOR", 3));

  GC_INIT ();

#if (! ((defined GC_VERSION_MAJOR) && (GC_VERSION_MAJOR >= 7))) \
    && (defined SCM_I_GSC_USE_PTHREAD_THREADS)
  /* When using GC 6.8, this call is required to initialize thread-local
     freelists (shouldn't be necessary with GC 7.0).  */
  GC_init ();
#endif
...
}

The presumption is wrong, because it does not work on Mac OS X without calling 
GC_init() - I have tried.

Hans





reply via email to

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