ruby-changes:44236
From: usa <ko1@a...>
Date: Sat, 1 Oct 2016 01:08:43 +0900 (JST)
Subject: [ruby-changes:44236] usa:r56308 (ruby_2_2): merge revision(s) 56030, 56035: [Backport #12711]
usa 2016-10-01 00:58:12 +0900 (Sat, 01 Oct 2016) New Revision: 56308 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56308 Log: merge revision(s) 56030,56035: [Backport #12711] * vm_dump.c (backtrace): use rip in the saved context for the case the SIGSEGV is received when the process is in userland. Note that ip in the stack should be used if the signal is received when it is in kernel (when it is calling syscall) [Bug #12711] Modified directories: branches/ruby_2_2/ Modified files: branches/ruby_2_2/ChangeLog branches/ruby_2_2/version.h branches/ruby_2_2/vm_dump.c Index: ruby_2_2/version.h =================================================================== --- ruby_2_2/version.h (revision 56307) +++ ruby_2_2/version.h (revision 56308) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/version.h#L1 #define RUBY_VERSION "2.2.6" #define RUBY_RELEASE_DATE "2016-10-01" -#define RUBY_PATCHLEVEL 377 +#define RUBY_PATCHLEVEL 378 #define RUBY_RELEASE_YEAR 2016 #define RUBY_RELEASE_MONTH 10 Index: ruby_2_2/vm_dump.c =================================================================== --- ruby_2_2/vm_dump.c (revision 56307) +++ ruby_2_2/vm_dump.c (revision 56308) @@ -487,10 +487,14 @@ darwin_sigtramp: https://github.com/ruby/ruby/blob/trunk/ruby_2_2/vm_dump.c#L487 unw_set_reg(&cursor, UNW_X86_64_R13, uctx->uc_mcontext->__ss.__r13); 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 = *(unw_word_t*)uctx->uc_mcontext->__ss.__rsp; - unw_set_reg(&cursor, UNW_REG_IP, ip); - trace[n++] = (void *)uctx->uc_mcontext->__ss.__rip; + ip = uctx->uc_mcontext->__ss.__rip; + if (((char*)ip)[-2] == 0x0f && ((char*)ip)[-1] == 5) { + /* signal received in syscall */ + trace[n++] = (void *)ip; + ip = *(unw_word_t*)uctx->uc_mcontext->__ss.__rsp; + } trace[n++] = (void *)ip; + unw_set_reg(&cursor, UNW_REG_IP, ip); } while (unw_step(&cursor) > 0) { unw_get_reg(&cursor, UNW_REG_IP, &ip); Index: ruby_2_2/ChangeLog =================================================================== --- ruby_2_2/ChangeLog (revision 56307) +++ ruby_2_2/ChangeLog (revision 56308) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/ChangeLog#L1 +Sat Oct 1 00:57:54 2016 NARUSE, Yui <naruse@r...> + + * vm_dump.c (backtrace): use rip in the saved context for the case + the SIGSEGV is received when the process is in userland. + Note that ip in the stack should be used if the signal is received + when it is in kernel (when it is calling syscall) [Bug #12711] + Sat Oct 1 00:56:19 2016 Aaron Patterson <tenderlove@r...> * lib/uri/generic.rb (def check_password): don't include bad password Property changes on: ruby_2_2 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r56030,56035 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/