diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-07-03 09:06:28 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-07-03 09:06:28 +0000 |
commit | e1fc1fcf6c716d6e951f1b31ce6f562e64c39808 (patch) | |
tree | 182ab89fa8c4b940773931bedf409df7c09e26a6 /vm.c | |
parent | 6cc622fc092ed03c814008d2338290635a639833 (diff) | |
download | ruby-e1fc1fcf6c716d6e951f1b31ce6f562e64c39808.tar.gz |
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
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } |