ruby-changes:2929
From: ko1@a...
Date: 21 Dec 2007 17:27:28 +0900
Subject: [ruby-changes:2929] ko1 - Ruby:r14420 (trunk): * thread.c (rb_thread_atfork): fix to mark thread object.
ko1 2007-12-21 17:27:14 +0900 (Fri, 21 Dec 2007)
New Revision: 14420
Added files:
trunk/bootstraptest/test_fork.rb
Modified files:
trunk/ChangeLog
trunk/bootstraptest/test_knownbug.rb
trunk/thread.c
Log:
* thread.c (rb_thread_atfork): fix to mark thread object.
[ruby-dev:32404]
* bootstraptest/test_knownbug.rb, test_fork.rb: move a fixed test.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14420&r2=14419
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/thread.c?r1=14420&r2=14419
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/bootstraptest/test_fork.rb?revision=14420&view=markup
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/bootstraptest/test_knownbug.rb?r1=14420&r2=14419
Index: ChangeLog
===================================================================
--- ChangeLog (revision 14419)
+++ ChangeLog (revision 14420)
@@ -1,3 +1,10 @@
+Fri Dec 21 17:25:22 2007 Koichi Sasada <ko1@a...>
+
+ * thread.c (rb_thread_atfork): fix to mark thread object.
+ [ruby-dev:32404]
+
+ * bootstraptest/test_knownbug.rb, test_fork.rb: move a fixed test.
+
Fri Dec 21 17:07:13 2007 Koichi Sasada <ko1@a...>
* gc.h: extern variable should not be initialized.
Index: bootstraptest/test_knownbug.rb
===================================================================
--- bootstraptest/test_knownbug.rb (revision 14419)
+++ bootstraptest/test_knownbug.rb (revision 14420)
@@ -3,13 +3,6 @@
# So all tests will cause failure.
#
-assert_equal '0', %q{
- GC.stress = true
- pid = fork {}
- Process.wait pid
- $?.to_i
-}, '[ruby-dev:32404]'
-
assert_equal 'ok', %q{
1.times{
eval("break")
Index: bootstraptest/test_fork.rb
===================================================================
--- bootstraptest/test_fork.rb (revision 0)
+++ bootstraptest/test_fork.rb (revision 14420)
@@ -0,0 +1,6 @@
+assert_equal '0', %q{
+ GC.stress = true
+ pid = fork {}
+ Process.wait pid
+ $?.to_i
+}, '[ruby-dev:32404]'
Index: thread.c
===================================================================
--- thread.c (revision 14419)
+++ thread.c (revision 14420)
@@ -1974,11 +1974,12 @@
{
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 {
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml