зеркало из https://github.com/github/ruby.git
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:
Родитель
2eec526053
Коммит
8b162ce9d1
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++;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче