diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-08-01 20:08:22 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-08-01 20:55:03 +0900 |
commit | 8b162ce9d1003e4e469d8f48cb9a2076fd45b47c (patch) | |
tree | b22c29bc6c9f188d457ac83ace21cd57bfba3b59 /gc.c | |
parent | 2eec526053186f05e8b73003d5212c871724a309 (diff) |
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.
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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++; } |