From 962f40ae4e01a3a90b281b41bd7093ebabeda039 Mon Sep 17 00:00:00 2001 From: ko1 Date: Fri, 21 Dec 2007 08:27:14 +0000 Subject: * thread.c (rb_thread_atfork): fix to mark thread object. [ruby-dev:32404] * bootstraptest/test_knownbug.rb, test_fork.rb: move a fixed test. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'thread.c') diff --git a/thread.c b/thread.c index 936360d5b..d4916016c 100644 --- a/thread.c +++ b/thread.c @@ -1974,11 +1974,12 @@ rb_thread_atfork(void) { rb_thread_t *th = GET_THREAD(); rb_vm_t *vm = th->vm; + volatile VALUE thval = th->self; vm->main_thread = th; st_free_table(vm->living_threads); vm->living_threads = st_init_numtable(); - st_insert(vm->living_threads, th->self, (st_data_t) th->thread_id); + st_insert(vm->living_threads, thval, (st_data_t) th->thread_id); } struct thgroup { -- cgit