From 980155686aa373e015f51e3e279403d2aa66d4b9 Mon Sep 17 00:00:00 2001 From: nagachika Date: Sun, 15 May 2011 12:41:40 +0000 Subject: * cont.c (cont_init): clear macihne_stack_start/end of saved thread to prevent mark machine stack of GC'ed Thread. root Fiber is not initialized by fiber_init(). based on a patch by Serge Balyuk [ruby-core:35891] fixes #4612 * test/ruby/test_fiber.rb (test_gc_root_fiber): add test for it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- cont.c | 1 + 1 file changed, 1 insertion(+) (limited to 'cont.c') diff --git a/cont.c b/cont.c index ad277bda1d..9a0593c21e 100644 --- a/cont.c +++ b/cont.c @@ -383,6 +383,7 @@ cont_init(rb_context_t *cont, rb_thread_t *th) /* save thread context */ cont->saved_thread = *th; cont->saved_thread.local_storage = 0; + cont->saved_thread.machine_stack_start = cont->saved_thread.machine_stack_end = 0; } static rb_context_t * -- cgit v1.2.3