aboutsummaryrefslogtreecommitdiffstats
path: root/compile.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-23 04:12:14 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-23 04:12:14 +0000
commit32ce367ff0de181d8a056d593476352ce041bc7e (patch)
treef3ad93ed725d32547b318360d1064a8e2f4b84a7 /compile.c
parenta13b18877dc553a0357b67e7e0eec07e5ab6ac88 (diff)
downloadruby-32ce367ff0de181d8a056d593476352ce041bc7e.tar.gz
check trace flags at loading [Bug #14702]
* iseq.c (iseq_init_trace): at ISeq loading time, we need to check `ruby_vm_event_enabled_flags` to turn on trace instructions. Seprate this checking code from `finish_iseq_build()` and make new function. `iseq_ibf_load()` calls this funcation after loading. * test/ruby/test_iseq.rb: add a test for this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/compile.c b/compile.c
index 2631a97aed..00b9e1d6ae 100644
--- a/compile.c
+++ b/compile.c
@@ -10010,6 +10010,8 @@ iseq_ibf_load(VALUE str)
ibf_load_setup(load, loader_obj, str);
iseq = ibf_load_iseq(load, 0);
+ iseq_init_trace(iseq);
+
RB_GC_GUARD(loader_obj);
return iseq;
}