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

ruby-changes:25036

From: nari <ko1@a...>
Date: Thu, 4 Oct 2012 23:48:17 +0900 (JST)
Subject: [ruby-changes:25036] nari:r37088 (trunk): * gc.c (init_heap): call init_mark_stack before to allocate

nari	2012-10-04 23:48:02 +0900 (Thu, 04 Oct 2012)

  New Revision: 37088

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

  Log:
    * gc.c (init_heap): call init_mark_stack before to allocate
      altstack. This change avoid the stack overflow at the signal
      handler on 32bit, but I don't understand reason... [Feature #7095]

  Modified files:
    trunk/ChangeLog
    trunk/gc.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 37087)
+++ ChangeLog	(revision 37088)
@@ -1,3 +1,9 @@
+Thu Oct  4 23:40:04 2012  Narihiro Nakamura  <authornari@g...>
+
+	* gc.c (init_heap): call init_mark_stack before to allocate
+	  altstack. This change avoid the stack overflow at the signal
+	  handler on 32bit, but I don't understand reason... [Feature #7095]
+
 Thu Oct  4 22:39:27 2012  Koichi Sasada  <ko1@a...>
 
 	* insns.def (getlocal, setlocal): remove old getlocal/setlocal
Index: gc.c
===================================================================
--- gc.c	(revision 37087)
+++ gc.c	(revision 37088)
@@ -587,6 +587,8 @@
 init_heap(rb_objspace_t *objspace)
 {
     add_heap_slots(objspace, HEAP_MIN_SLOTS / HEAP_OBJ_LIMIT);
+    init_mark_stack(&objspace->mark_stack);
+
 #ifdef USE_SIGALTSTACK
     {
 	/* altstack of another threads are allocated in another place */
@@ -599,7 +601,6 @@
 
     objspace->profile.invoke_time = getrusage_time();
     finalizer_table = st_init_numtable();
-    init_mark_stack(&objspace->mark_stack);
 }
 
 static void

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

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