From e1fbe716e8596b7027af57623ebc72a0c6393187 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Mon, 30 Jan 2012 16:42:09 +0100 Subject: [PATCH] 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. --- libguile/gc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libguile/gc.c b/libguile/gc.c index 7816801e1..fd37046af 100644 --- a/libguile/gc.c +++ b/libguile/gc.c @@ -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); } -- 2.20.1