Project

General

Profile

Actions

Bug #15270

closed

[PATCH] Fix TracePoint for code loaded using ISeq.load_from_binary

Added by alanwu (Alan Wu) over 5 years ago. Updated almost 5 years ago.

Status:
Closed
Target version:
-
[ruby-core:89641]

Description

Hello. This is a patch for Bug #14702, which I don't think is fully addressed.
The tests in the patch should fail on both trunk and ruby_2_5.

    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.

Files


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #15717: Backport #15270 to Ruby 2.5.xClosedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0