[#46689] [IMPORTANT] 2.0.0 release plan — Yusuke Endoh <mame@...>
ALL COMMITTERS SHOULD READ THIS MAIL! コミッタはこのメール読んで!
5 messages
2012/12/02
[#46707] [ruby-trunk - Feature #7510][Open] irb --help が古い — "sho-h (Sho Hashimoto)" <sho-h@...>
6 messages
2012/12/04
[#46710] [ruby-trunk - Bug #7520][Assigned] irb/completion でインスタンス変数がチェックされていない — "tarui (Masaya Tarui)" <tarui@...>
4 messages
2012/12/05
[#46747] [ruby-trunk - Bug #7572][Open] クラス定義においてスーパークラスとしてクラスでないものを指定してもエラーにならない事がある — "tadf (tadayoshi funaba)" <redmine@...>
6 messages
2012/12/16
[#46750] [ruby-trunk - Bug #7575][Open] Struct のメンバーをアクセサで参照できない事がある — "tadf (tadayoshi funaba)" <redmine@...>
4 messages
2012/12/16
[#46766] [ruby-trunk - Bug #7590][Open] parallel test-all で test_settracefunc が cfp consistency error — "tarui (Masaya Tarui)" <tarui@...>
5 messages
2012/12/19
[#46797] [ruby-trunk - Bug #7603][Open] app_factorial と so_ackermann が動かない — "authorNari (Narihiro Nakamura)" <authorNari@...>
5 messages
2012/12/22
[#46798] Re: [ruby-dev:46797] [ruby-trunk - Bug #7603][Open] app_factorial と so_ackermann が動かない
— SASADA Koichi <ko1@...>
2012/12/22
あれぇ,以前よりも増やしたつもりだったんだけど....
[#46807] [ruby-trunk - Bug #7625][Open] Arrayを継承したオブジェクトのcompactがArrayを返す — "mogya@... (Daisuke Furukawa)" <mogya@...>
19 messages
2012/12/26
[#46813] backport93からの移動 [Re: [ruby-core:51175] [Backport93 - Backport #7632] IRB autocompletion bug] — keiju@... (keiju ISHITSUKA)
けいじゅ@いしつかです.
3 messages
2012/12/29
[ruby-dev:46724] Fwd: [ruby-changes:26236] nobu:r38293 (trunk): vm_trace.c: exceptions in event hooks
From:
SASADA Koichi <ko1@...>
Date:
2012-12-10 18:43:17 UTC
List:
ruby-dev #46724
これ,今更の大きな仕様変更に見えるのですが,いいのでしょうか. -------- Original Message -------- Subject: [ruby-changes:26236] nobu:r38293 (trunk): vm_trace.c: exceptions in event hooks Date: Mon, 10 Dec 2012 15:25:22 +0900 (JST) From: nobu <[email protected]> Reply-To: [email protected] To: [email protected] nobu 2012-12-10 15:23:44 +0900 (Mon, 10 Dec 2012) New Revision: 38293 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38293 Log: vm_trace.c: exceptions in event hooks * vm_trace.c (rb_threadptr_exec_event_hooks): exceptions in event hooks should not propagate outside. Modified files: trunk/ChangeLog trunk/KNOWNBUGS.rb trunk/test/ruby/test_settracefunc.rb trunk/vm_trace.c Index: ChangeLog =================================================================== --- ChangeLog (revision 38292) +++ ChangeLog (revision 38293) @@ -1,3 +1,8 @@ +Mon Dec 10 15:23:35 2012 Nobuyoshi Nakada <[email protected]> + + * vm_trace.c (rb_threadptr_exec_event_hooks): exceptions in event + hooks should not propagate outside. + Mon Dec 10 15:11:06 2012 Nobuyoshi Nakada <[email protected]> * compile.c (iseq_compile_each): count flip-flop state in local iseq Index: KNOWNBUGS.rb =================================================================== --- KNOWNBUGS.rb (revision 38292) +++ KNOWNBUGS.rb (revision 38293) @@ -3,5 +3,3 @@ # So all tests will cause failure. # -assert_equal('ok', "TracePoint.new(:line) {raise}.enable {\n 1\n}\n'ok'") -assert_finish(3, 'def m; end; TracePoint.new(:return) {raise}.enable {m}') Index: vm_trace.c =================================================================== --- vm_trace.c (revision 38292) +++ vm_trace.c (revision 38293) @@ -286,14 +286,14 @@ if (th->trace_running == 0 && targ->self != rb_mRubyVMFrozenCore /* skip special methods. TODO: remove it. */) { const int vm_tracing = th->vm->trace_running; + const VALUE errinfo = th->errinfo; + const int outer_state = th->state; int state = 0; - int outer_state = th->state; th->state = 0; th->vm->trace_running = 1; th->trace_running = 1; { - const VALUE errinfo = th->errinfo; rb_hook_list_t *list; /* thread local traces */ @@ -309,15 +309,11 @@ state = exec_hooks(th, list, targ, !vm_tracing); if (state) goto terminate; } - th->errinfo = errinfo; } terminate: + th->errinfo = errinfo; th->trace_running = 0; th->vm->trace_running = vm_tracing; - - if (state) { - TH_JUMP_TAG(th, state); - } th->state = outer_state; } } Index: test/ruby/test_settracefunc.rb =================================================================== --- test/ruby/test_settracefunc.rb (revision 38292) +++ test/ruby/test_settracefunc.rb (revision 38293) @@ -798,4 +798,18 @@ end } end + + def test_tracepoint_exception_at_line + assert_nothing_raised do + TracePoint.new(:line) {raise}.enable { + 1 + } + end + end + + def test_tracepoint_exception_at_return + assert_nothing_raised(Timeout::Error, 'infinite trace') do + assert_normal_exit('def m; end; TracePoint.new(:return) {raise}.enable {m}', '', timeout: 3) + end + end end -- ML: [email protected] Info: http://www.atdot.net/~ko1/quickml/