ruby-changes:51626
From: normal <ko1@a...>
Date: Tue, 3 Jul 2018 18:06:33 +0900 (JST)
Subject: [ruby-changes:51626] normal:r63837 (trunk): vm.c (rb_source_location): check for NULL cfp->iseq
normal 2018-07-03 18:06:28 +0900 (Tue, 03 Jul 2018) New Revision: 63837 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63837 Log: vm.c (rb_source_location): check for NULL cfp->iseq rb_vm_get_sourceline returns zero if cfp->iseq is NULL, so rb_iseq_path should not try to follow NULL cfp->iseq, either. Modified files: trunk/vm.c Index: vm.c =================================================================== --- vm.c (revision 63836) +++ vm.c (revision 63837) @@ -1291,7 +1291,7 @@ rb_source_location(int *pline) https://github.com/ruby/ruby/blob/trunk/vm.c#L1291 const rb_execution_context_t *ec = GET_EC(); const rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp); - if (cfp) { + if (cfp && cfp->iseq) { if (pline) *pline = rb_vm_get_sourceline(cfp); return rb_iseq_path(cfp->iseq); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/