ruby-changes:24108
From: naruse <ko1@a...>
Date: Thu, 21 Jun 2012 13:46:40 +0900 (JST)
Subject: [ruby-changes:24108] naruse:r36159 (ruby_1_9_3): merge revision(s) 35625: [Backport #6618]
naruse 2012-06-21 13:46:26 +0900 (Thu, 21 Jun 2012) New Revision: 36159 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36159 Log: merge revision(s) 35625: [Backport #6618] * thread.c (rb_threadptr_execute_interrupts_common): test_signal_requiring of test/ruby/test_signal.rb fail if the sub process is killed on waiting IO in lex_io_gets in rb_load_file in rb_load_internal in require. This is because (1) the process receive the killing signal in rb_thread_io_blocking_region in rb_read_internal in lex_io_gets. (2) set th->errinfo as INT2FIX(TAG_FATAL) at rb_threadptr_execute_interrupts_common. (3) escape rb_load_file in rb_load_internal and jump to EXEC_TAG() without set loaded as TRUE. (4) call first rb_exc_raise(GET_THREAD()->errinfo); because loaded is FALSE as above. this errinfo should be an exception object but this is INT2FIX(TAG_FATAL). Don't call first rb_exc_raise if GET_THREAD()->errinfo is Fixnum. Modified files: branches/ruby_1_9_3/ChangeLog branches/ruby_1_9_3/load.c branches/ruby_1_9_3/version.h Index: ruby_1_9_3/ChangeLog =================================================================== --- ruby_1_9_3/ChangeLog (revision 36158) +++ ruby_1_9_3/ChangeLog (revision 36159) @@ -1,3 +1,21 @@ +Thu Jun 21 13:42:57 2012 NARUSE, Yui <naruse@r...> + + * thread.c (rb_threadptr_execute_interrupts_common): + test_signal_requiring of test/ruby/test_signal.rb fail if the sub + process is killed on waiting IO in lex_io_gets in rb_load_file in + rb_load_internal in require. + This is because + (1) the process receive the killing signal in + rb_thread_io_blocking_region in rb_read_internal in lex_io_gets. + (2) set th->errinfo as INT2FIX(TAG_FATAL) at + rb_threadptr_execute_interrupts_common. + (3) escape rb_load_file in rb_load_internal and jump to EXEC_TAG() + without set loaded as TRUE. + (4) call first rb_exc_raise(GET_THREAD()->errinfo); because loaded + is FALSE as above. this errinfo should be an exception object + but this is INT2FIX(TAG_FATAL). + Don't call first rb_exc_raise if GET_THREAD()->errinfo is Fixnum. + Mon Jun 11 19:56:22 2012 KOSAKI Motohiro <kosaki.motohiro@g...> * test/webrick/test_cgi.rb (class TestWEBrickCGI): respect Index: ruby_1_9_3/load.c =================================================================== --- ruby_1_9_3/load.c (revision 36158) +++ ruby_1_9_3/load.c (revision 36159) @@ -319,7 +319,8 @@ th->top_self = self; th->top_wrapper = wrapper; - if (!loaded) { + if (!loaded && !FIXNUM_P(GET_THREAD()->errinfo)) { + /* an error on loading don't include INT2FIX(TAG_FATAL) see r35625 */ rb_exc_raise(GET_THREAD()->errinfo); } if (state) { Index: ruby_1_9_3/version.h =================================================================== --- ruby_1_9_3/version.h (revision 36158) +++ ruby_1_9_3/version.h (revision 36159) @@ -1,10 +1,10 @@ #define RUBY_VERSION "1.9.3" -#define RUBY_PATCHLEVEL 236 +#define RUBY_PATCHLEVEL 237 -#define RUBY_RELEASE_DATE "2012-06-11" +#define RUBY_RELEASE_DATE "2012-06-21" #define RUBY_RELEASE_YEAR 2012 #define RUBY_RELEASE_MONTH 6 -#define RUBY_RELEASE_DAY 11 +#define RUBY_RELEASE_DAY 21 #include "ruby/version.h" -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/