mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix assertion failure when VM_CHECK_MODE
Some VM frames (dummy and top pushed by `rb_vm_call_cfunc`) has iseq but has no pc.
This commit is contained in:
parent
2eec526053
commit
8b162ce9d1
1 changed files with 1 additions and 1 deletions
2
gc.c
2
gc.c
|
@ -1926,7 +1926,7 @@ static void
|
|||
gc_event_hook_body(rb_execution_context_t *ec, rb_objspace_t *objspace, const rb_event_flag_t event, VALUE data)
|
||||
{
|
||||
const VALUE *pc = ec->cfp->pc;
|
||||
if (VM_FRAME_RUBYFRAME_P(ec->cfp)) {
|
||||
if (pc && VM_FRAME_RUBYFRAME_P(ec->cfp)) {
|
||||
/* increment PC because source line is calculated with PC-1 */
|
||||
ec->cfp->pc++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue