summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-27 15:00:41 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-27 15:00:41 +0000
commitf93e39261c8f44cc4dd77ac4802aa913561b5157 (patch)
treecca9c39b7da747f6521a064aba43d7bb7211b430
parente59b9d35fcd58331928aa1f62fe48287b0c643e2 (diff)
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--eval.c6
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 2b113e3053..051ef54d39 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Tue Apr 27 23:57:04 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * 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@tsg.ne.jp>
* insns.def (onceinlinecache): add exclusion control for a region
diff --git a/eval.c b/eval.c
index 2db160c2ea..c16142b191 100644
--- a/eval.c
+++ b/eval.c
@@ -132,7 +132,11 @@ ruby_cleanup(volatile int ex)
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;