guile-user
[Top][All Lists]
Advanced

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

Re: Latest guile 1.9 segfault in GC


From: Ludovic Courtès
Subject: Re: Latest guile 1.9 segfault in GC
Date: Wed, 18 Aug 2010 16:07:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hi!

Cedric Cellier <address@hidden> writes:

> I do not understand how this GC works, but find it strange that this global
> variable is changed like this, especially since the libgc gc.h reads :
> "GC_all_interior_pointers (...) May not be changed after GC initialization."

‘scm_storage_prehistory’ does that in the right order:

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

    GC_INIT ();

> How come the libgc GC_init function was already called when
> scm_storage_prehistory is called ? Apparently, the libgc overload
> pthread_create with its GC_pthread_create().
>
> So, guile must be inited before starting any thread.
>
> Let's try...
>
> OK, it works.

Cool.  :-)

Thanks,
Ludo




reply via email to

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