ruby-changes:56752
From: Nobuyoshi <ko1@a...>
Date: Thu, 1 Aug 2019 20:55:49 +0900 (JST)
Subject: [ruby-changes:56752] Nobuyoshi Nakada: 8b162ce9d1 (master): Fix assertion failure when VM_CHECK_MODE
https://git.ruby-lang.org/ruby.git/commit/?id=8b162ce9d1 From 8b162ce9d1003e4e469d8f48cb9a2076fd45b47c Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 1 Aug 2019 20:08:22 +0900 Subject: 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. diff --git a/gc.c b/gc.c index fd30c75..fb8fa53 100644 --- a/gc.c +++ b/gc.c @@ -1926,7 +1926,7 @@ static void https://github.com/ruby/ruby/blob/trunk/gc.c#L1926 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++; } -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/