aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--test/ruby/test_settracefunc.rb8
-rw-r--r--vm_trace.c1
3 files changed, 15 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 78690f4a1e..532672021c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Nov 7 09:39:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * vm_trace.c (rb_threadptr_exec_event_hooks_orig): errinfo should not
+ be propagated to trace blocks so that no argument raise does not
+ throw internal objects. [ruby-dev:47793] [Bug #9088]
+
Wed Nov 6 21:30:55 2013 Masaya Tarui <tarui@ruby-lang.org>
* gc.c (gc_before_sweep): Change algorithm of malloc_limit to
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb
index 56700fc71b..c982e57cdb 100644
--- a/test/ruby/test_settracefunc.rb
+++ b/test/ruby/test_settracefunc.rb
@@ -991,4 +991,12 @@ class TestSetTraceFunc < Test::Unit::TestCase
assert_equal 9, n
end
+
+ def test_isolated_raise_in_trace
+ bug9088 = '[ruby-dev:47793] [Bug #9088]'
+ assert_ruby_status([], <<-END, bug9088)
+ set_trace_func proc {raise rescue nil}
+ 1.times {break}
+ END
+ end
end
diff --git a/vm_trace.c b/vm_trace.c
index ce078ca162..a96e733741 100644
--- a/vm_trace.c
+++ b/vm_trace.c
@@ -294,6 +294,7 @@ rb_threadptr_exec_event_hooks_orig(rb_trace_arg_t *trace_arg, int pop_p)
const int outer_state = th->state;
int state = 0;
th->state = 0;
+ th->errinfo = Qnil;
th->vm->trace_running++;
th->trace_arg = trace_arg;