Project

General

Profile

Bug #1588

ブロックの中断でset_trace_funcのreturnイベントが呼び出されない

Added by kumaryu (Ryuichi Sakamoto) over 10 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Target version:
ruby -v:
ruby 1.9.2dev (2009-06-08 trunk 23650) [i386-darwin9.7.0]
Backport:
[ruby-dev:38582]

Description

=begin
set_trace_funcでフックを設定した時に、ブロック中のbreakや例外で脱出をすると
'return'や'c-return'イベントが発生せずフックが呼び出されません。

$ cat tracefunc.rb
set_trace_func(proc {|event, file, line, id, binding, klass|
puts "'#{id}' event: #{event}" unless /line/ =~ event
})

1.times do
break
end

$ ./ruby1.9 -v tracefunc.rb
ruby 1.9.2dev (2009-06-08 trunk 23650) [i386-darwin9.7.0]
'set_trace_func' event: c-return
'times' event: c-call

1.8ではc-returnが呼ばれます。

$ ruby -v tracefunc.rb
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9]
'times' event: c-call
'times' event: c-return

この影響でプロファイラでの計測が正常に出来ません。
=end

Associated revisions

Revision 38a22404
Added by wanabe (_ wanabe) over 10 years ago

  • vm_insnhelper.c (vm_call_cfunc): ensure hook c-return.
    [Bug #1588]

  • test/ruby/test_settracefunc.rb (TestSetTraceFunc#test_raise):
    follow above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 24574
Added by wanabe (_ wanabe) over 10 years ago

  • vm_insnhelper.c (vm_call_cfunc): ensure hook c-return.
    [Bug #1588]

  • test/ruby/test_settracefunc.rb (TestSetTraceFunc#test_raise):
    follow above.

Revision 24574
Added by wanabe (_ wanabe) over 10 years ago

  • vm_insnhelper.c (vm_call_cfunc): ensure hook c-return.
    [Bug #1588]

  • test/ruby/test_settracefunc.rb (TestSetTraceFunc#test_raise):
    follow above.

Revision 24574
Added by wanabe (_ wanabe) over 10 years ago

  • vm_insnhelper.c (vm_call_cfunc): ensure hook c-return.
    [Bug #1588]

  • test/ruby/test_settracefunc.rb (TestSetTraceFunc#test_raise):
    follow above.

Revision 24574
Added by wanabe (_ wanabe) over 10 years ago

  • vm_insnhelper.c (vm_call_cfunc): ensure hook c-return.
    [Bug #1588]

  • test/ruby/test_settracefunc.rb (TestSetTraceFunc#test_raise):
    follow above.

Revision 24574
Added by wanabe (_ wanabe) over 10 years ago

  • vm_insnhelper.c (vm_call_cfunc): ensure hook c-return.
    [Bug #1588]

  • test/ruby/test_settracefunc.rb (TestSetTraceFunc#test_raise):
    follow above.

Revision 24574
Added by wanabe (_ wanabe) over 10 years ago

  • vm_insnhelper.c (vm_call_cfunc): ensure hook c-return.
    [Bug #1588]

  • test/ruby/test_settracefunc.rb (TestSetTraceFunc#test_raise):
    follow above.

Revision 3b6e807a
Added by yugui (Yuki Sonoda) over 10 years ago

merges r24574 from trunk into ruby_1_9_1.

  • vm_insnhelper.c (vm_call_cfunc): ensure hook c-return.
    [Bug #1588]

  • test/ruby/test_settracefunc.rb (TestSetTraceFunc#test_raise):
    follow above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

History

#1

Updated by yugui (Yuki Sonoda) over 10 years ago

  • Category set to YARV
  • Assignee set to ko1 (Koichi Sasada)
  • Target version changed from 2.0.0 to 1.9.2

=begin

=end

#2

Updated by wanabe (_ wanabe) over 10 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
Applied in changeset r24574.
=end

Also available in: Atom PDF