ruby-changes:3082
From: ko1@a...
Date: 24 Dec 2007 13:44:05 +0900
Subject: [ruby-changes:3082] nobu - Ruby:r14574 (trunk): * thread.c (rb_thread_atfork): should not leave living_threads
nobu 2007-12-24 13:43:38 +0900 (Mon, 24 Dec 2007)
New Revision: 14574
Modified files:
trunk/ChangeLog
trunk/thread.c
Log:
* thread.c (rb_thread_atfork): should not leave living_threads
referring freed table while allocating new table.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14574&r2=14573
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/thread.c?r1=14574&r2=14573
Index: ChangeLog
===================================================================
--- ChangeLog (revision 14573)
+++ ChangeLog (revision 14574)
@@ -1,3 +1,8 @@
+Mon Dec 24 13:43:36 2007 Nobuyoshi Nakada <nobu@r...>
+
+ * thread.c (rb_thread_atfork): should not leave living_threads
+ referring freed table while allocating new table.
+
Mon Dec 24 12:49:54 2007 Nobuyoshi Nakada <nobu@r...>
* Makefile.in, configure.in, lib/mkmf.rb, */Makefile.sub: specify
Index: thread.c
===================================================================
--- thread.c (revision 14573)
+++ thread.c (revision 14574)
@@ -1974,11 +1974,10 @@
{
rb_thread_t *th = GET_THREAD();
rb_vm_t *vm = th->vm;
- volatile VALUE thval = th->self;
+ VALUE thval = th->self;
vm->main_thread = th;
- st_free_table(vm->living_threads);
- vm->living_threads = st_init_numtable();
+ st_clear(vm->living_threads);
st_insert(vm->living_threads, thval, (st_data_t) th->thread_id);
}
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml