ruby-changes:46653
From: naruse <ko1@a...>
Date: Wed, 17 May 2017 16:13:53 +0900 (JST)
Subject: [ruby-changes:46653] naruse:r58769 (trunk): Treat NULL reference case [Bug #13566]
naruse 2017-05-17 16:13:47 +0900 (Wed, 17 May 2017) New Revision: 58769 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58769 Log: Treat NULL reference case [Bug #13566] Modified files: trunk/vm_dump.c Index: vm_dump.c =================================================================== --- vm_dump.c (revision 58768) +++ vm_dump.c (revision 58769) @@ -475,8 +475,8 @@ darwin_sigtramp: https://github.com/ruby/ruby/blob/trunk/vm_dump.c#L475 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; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/