diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-17 07:13:47 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-17 07:13:47 +0000 |
commit | 0c0f75b7983e6083ad21690149bf79ea878c6804 (patch) | |
tree | 16076c580b46a40a116a38ac6db05f6cf06311b0 /vm_dump.c | |
parent | 9cf7985893f33ba6f93b5b657c73e0ca289610cd (diff) | |
download | ruby-0c0f75b7983e6083ad21690149bf79ea878c6804.tar.gz |
Treat NULL reference case [Bug #13566]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_dump.c')
-rw-r--r-- | vm_dump.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -475,8 +475,8 @@ darwin_sigtramp: unw_set_reg(&cursor, UNW_X86_64_R14, uctx->uc_mcontext->__ss.__r14); unw_set_reg(&cursor, UNW_X86_64_R15, uctx->uc_mcontext->__ss.__r15); ip = uctx->uc_mcontext->__ss.__rip; - if (((char*)ip)[-2] == 0x0f && ((char*)ip)[-1] == 5) { - /* signal received in syscall */ + if (!ip || (((char*)ip)[-2] == 0x0f && ((char*)ip)[-1] == 5)) { + /* NULL reference or signal received in syscall */ trace[n++] = (void *)ip; ip = *(unw_word_t*)uctx->uc_mcontext->__ss.__rsp; } |