diff options
author | Koichi Sasada <ko1@atdot.net> | 2022-10-17 17:50:42 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2022-10-20 17:38:28 +0900 |
commit | e35c528d721d209ed8531b10b46c2ac725ea7bf5 (patch) | |
tree | 7a5fe3d73461b9e628f04226dedfffe8632a5438 /vm_core.h | |
parent | 7563604fb868d87057733f52d780d841fc1ab6bb (diff) | |
download | ruby-e35c528d721d209ed8531b10b46c2ac725ea7bf5.tar.gz |
push dummy frame for loading process
This patch pushes dummy frames when loading code for the
profiling purpose.
The following methods push a dummy frame:
* `Kernel#require`
* `Kernel#load`
* `RubyVM::InstructionSequence.compile_file`
* `RubyVM::InstructionSequence.load_from_binary`
https://bugs.ruby-lang.org/issues/18559
Diffstat (limited to 'vm_core.h')
-rw-r--r-- | vm_core.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1371,7 +1371,8 @@ static inline int VM_FRAME_CFRAME_P(const rb_control_frame_t *cfp) { int cframe_p = VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_CFRAME) != 0; - VM_ASSERT(RUBY_VM_NORMAL_ISEQ_P(cfp->iseq) != cframe_p); + VM_ASSERT(RUBY_VM_NORMAL_ISEQ_P(cfp->iseq) != cframe_p || + (VM_FRAME_TYPE(cfp) & VM_FRAME_MAGIC_MASK) == VM_FRAME_MAGIC_DUMMY); return cframe_p; } |