[ruby-cvs:72667] ko1:r65567 (trunk): Fix TracePoint for nested iseq loaded from binary [Bug#14702]

ko1 at ruby-lang.org ko1 at ruby-lang.org
Tue Nov 6 15:36:52 JST 2018


ko1	2018-11-06 15:36:51 +0900 (Tue, 06 Nov 2018)

  New Revision: 65567

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65567

  Log:
    Fix TracePoint for nested iseq loaded from binary [Bug#14702]
    
    When loading iseq from binary while a TracePoint is on, we need to
    recompile instructions to their "trace_" variant. Before this commit
    we only recompiled instructions in the top level iseq, which meant
    that TracePoint was malfunctioning for code inside module/class/method
    definitions.
    
    * compile.c: Move rb_iseq_init_trace to rb_ibf_load_iseq_complete.
      It is called on all iseqs during loading.
    
    * test_iseq.rb: Test that tracepoints fire within children iseq when
      using load_from_binary.
    
    This patch is from: Alan Wu <XrXr at users.noreply.github.com>

  Modified files:
    trunk/compile.c
    trunk/test/ruby/test_iseq.rb


More information about the ruby-cvs mailing list