1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 03:30:27 +02:00

fix hook invocation during thread guilification

* libguile/gc.c (run_before_gc_c_hook): Don't run pre-GC hooks from a
  thread that is in the process of guilification.
This commit is contained in:
Andy Wingo 2012-01-30 16:42:09 +01:00
parent 07c2ca0f0d
commit e1fbe716e8

View file

@ -234,6 +234,10 @@ scm_t_c_hook scm_after_gc_c_hook;
static void
run_before_gc_c_hook (void)
{
if (!SCM_I_CURRENT_THREAD)
/* GC while a thread is spinning up; punt. */
return;
scm_c_hook_run (&scm_before_gc_c_hook, NULL);
}