From 18c79781616f3a1d502c3c4061da2d8893f1e4ca Mon Sep 17 00:00:00 2001 From: normal Date: Tue, 3 Jul 2018 09:06:28 +0000 Subject: 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm.c b/vm.c index 3cc0f94ebd..efdbff9a23 100644 --- a/vm.c +++ b/vm.c @@ -1291,7 +1291,7 @@ rb_source_location(int *pline) 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); } -- cgit v1.2.3