[前][次][番号順一覧][スレッド一覧]

ruby-changes:15608

From: mame <ko1@a...>
Date: Wed, 28 Apr 2010 00:00:57 +0900 (JST)
Subject: [ruby-changes:15608] Ruby:r27516 (trunk): * eval.c (ruby_cleanup): add exception guard around code running

mame	2010-04-28 00:00:41 +0900 (Wed, 28 Apr 2010)

  New Revision: 27516

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27516

  Log:
    * eval.c (ruby_cleanup): add exception guard around code running
      signal handler (of r27513).  Absence of the guard made
      bootstraptest/test_thread.rb fail sometimes.

  Modified files:
    trunk/ChangeLog
    trunk/eval.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 27515)
+++ ChangeLog	(revision 27516)
@@ -1,3 +1,9 @@
+Tue Apr 27 23:57:04 2010  Yusuke Endoh  <mame@t...>
+
+	* eval.c (ruby_cleanup): add exception guard around code running
+	  signal handler (of r27513).  Absence of the guard made
+	  bootstraptest/test_thread.rb fail sometimes.
+
 Tue Apr 27 22:55:29 2010  Yusuke Endoh  <mame@t...>
 
 	* insns.def (onceinlinecache): add exclusion control for a region
Index: eval.c
===================================================================
--- eval.c	(revision 27515)
+++ eval.c	(revision 27516)
@@ -132,7 +132,11 @@
 
     rb_threadptr_interrupt(th);
     rb_threadptr_check_signal(th);
-    RUBY_VM_CHECK_INTS();
+    PUSH_TAG();
+    if ((state = EXEC_TAG()) == 0) {
+	SAVE_ROOT_JMPBUF(th, { RUBY_VM_CHECK_INTS(); });
+    }
+    POP_TAG();
 
     errs[1] = th->errinfo;
     th->safe_level = 0;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]