[前][次][番号順一覧][スレッド一覧]

ruby-changes:46248

From: nobu <ko1@a...>
Date: Sat, 15 Apr 2017 11:37:26 +0900 (JST)
Subject: [ruby-changes:46248] nobu:r58363 (trunk): signal.c: last tag page condition

nobu	2017-04-15 11:37:21 +0900 (Sat, 15 Apr 2017)

  New Revision: 58363

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58363

  Log:
    signal.c: last tag page condition
    
    * signal.c (check_stack_overflow): drop the last tag when it is
      close to the fault page, not same as sp page.

  Modified files:
    trunk/signal.c
Index: signal.c
===================================================================
--- signal.c	(revision 58362)
+++ signal.c	(revision 58363)
@@ -843,7 +843,7 @@ check_stack_overflow(int sig, const uint https://github.com/ruby/ruby/blob/trunk/signal.c#L843
     if (sp_page == fault_page || sp_page == fault_page + 1 ||
 	sp_page <= fault_page && fault_page <= bp_page) {
 	rb_thread_t *th = ruby_current_thread;
-	if ((uintptr_t)th->tag->buf / pagesize == sp_page) {
+	if ((uintptr_t)th->tag->buf / pagesize <= fault_page + 1) {
 	    /* drop the last tag if it is close to the fault,
 	     * otherwise it can cause stack overflow again at the same
 	     * place. */

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]