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

ruby-changes:39545

From: naruse <ko1@a...>
Date: Tue, 18 Aug 2015 20:22:02 +0900 (JST)
Subject: [ruby-changes:39545] naruse:r51626 (trunk): * thread_pthread.c (reserve_stack): ensure the memory is really

naruse	2015-08-18 20:21:50 +0900 (Tue, 18 Aug 2015)

  New Revision: 51626

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

  Log:
    * thread_pthread.c (reserve_stack): ensure the memory is really
      allocated. [Bug #11457]

  Modified files:
    trunk/ChangeLog
    trunk/thread_pthread.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 51625)
+++ ChangeLog	(revision 51626)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Aug 18 20:05:49 2015  NARUSE, Yui  <naruse@r...>
+
+	* thread_pthread.c (reserve_stack): ensure the memory is really
+	  allocated. [Bug #11457]
+
 Tue Aug 18 17:19:21 2015  Nobuyoshi Nakada  <nobu@r...>
 
 	* parse.y (IS_BEG): include labeled argument state, which was
Index: thread_pthread.c
===================================================================
--- thread_pthread.c	(revision 51625)
+++ thread_pthread.c	(revision 51626)
@@ -686,8 +686,8 @@ reserve_stack(volatile char *limit, size https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L686
 	limit -= size;
 	if (buf > limit) {
 	    limit = alloca(buf - limit);
+	    limit[0] = 0; /* ensure alloca is called */
 	    limit -= stack_check_margin;
-	    limit[0] = 0;
 	}
     }
 }

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

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