ruby-changes:4834
From: ko1@a...
Date: Thu, 8 May 2008 15:59:24 +0900 (JST)
Subject: [ruby-changes:4834] akr - Ruby:r16328 (trunk): * thread.c (rb_gc_save_machine_context): call FLUSH_REGISTER_WINDOWS
akr 2008-05-08 15:59:03 +0900 (Thu, 08 May 2008) New Revision: 16328 Modified files: trunk/ChangeLog trunk/bootstraptest/test_thread.rb trunk/thread.c Log: * thread.c (rb_gc_save_machine_context): call FLUSH_REGISTER_WINDOWS to mark the register stack from GC on another thread. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=16328&r2=16327&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/thread.c?r1=16328&r2=16327&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/bootstraptest/test_thread.rb?r1=16328&r2=16327&diff_format=u Index: ChangeLog =================================================================== --- ChangeLog (revision 16327) +++ ChangeLog (revision 16328) @@ -1,3 +1,8 @@ +Thu May 8 15:36:11 2008 Tanaka Akira <akr@f...> + + * thread.c (rb_gc_save_machine_context): call FLUSH_REGISTER_WINDOWS + to mark the register stack from GC on another thread. + Thu May 8 15:14:34 2008 Nobuyoshi Nakada <nobu@r...> * array.c (rb_ary_sort_bang): freeze temporary array. Index: bootstraptest/test_thread.rb =================================================================== --- bootstraptest/test_thread.rb (revision 16327) +++ bootstraptest/test_thread.rb (revision 16328) @@ -234,3 +234,15 @@ STDERR.reopen(STDOUT) exec "/" } + +assert_normal_exit %q{ + (0..10).map { + Thread.new { + 10000.times { + Object.new.to_s + } + } + }.each {|t| + t.join + } +} Index: thread.c =================================================================== --- thread.c (revision 16327) +++ thread.c (revision 16328) @@ -1966,6 +1966,7 @@ rb_gc_save_machine_context(rb_thread_t *th) { SET_MACHINE_STACK_END(&th->machine_stack_end); + FLUSH_REGISTER_WINDOWS; #ifdef __ia64 th->machine_register_stack_end = rb_ia64_bsp(); #endif -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/