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

ruby-changes:12122

From: yugui <ko1@a...>
Date: Sun, 21 Jun 2009 18:17:17 +0900 (JST)
Subject: [ruby-changes:12122] Ruby:r23794 (ruby_1_9_1): merges r23720 from trunk into ruby_1_9_1.

yugui	2009-06-21 18:16:58 +0900 (Sun, 21 Jun 2009)

  New Revision: 23794

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

  Log:
    merges r23720 from trunk into ruby_1_9_1.
    --
    * thread.c (ruby_thread_stack_overflow): call rb_exc_raise() on
      stack overflows in the signal handler, if sigaltstack is
      available.  On stack overflow (and with sigaltstack), the signal
      handler is more likely to have room to create an exception
      object.  [ruby-core:23813]

  Modified files:
    branches/ruby_1_9_1/ChangeLog
    branches/ruby_1_9_1/thread.c
    branches/ruby_1_9_1/version.h

Index: ruby_1_9_1/ChangeLog
===================================================================
--- ruby_1_9_1/ChangeLog	(revision 23793)
+++ ruby_1_9_1/ChangeLog	(revision 23794)
@@ -1,3 +1,11 @@
+Wed Jun 17 12:37:37 2009  Yukihiro Matsumoto  <matz@r...>
+
+	* thread.c (ruby_thread_stack_overflow): call rb_exc_raise() on
+	  stack overflows in the signal handler, if sigaltstack is
+	  available.  On stack overflow (and with sigaltstack), the signal
+	  handler is more likely to have room to create an exception
+	  object.  [ruby-core:23813]
+
 Wed Jun 17 08:14:01 2009  Tadayoshi Funaba  <tadf@d...>
 
 	* complex.c (nucomp_coerce): accepts Complex instances.
Index: ruby_1_9_1/thread.c
===================================================================
--- ruby_1_9_1/thread.c	(revision 23793)
+++ ruby_1_9_1/thread.c	(revision 23794)
@@ -1302,12 +1302,21 @@
     rb_thread_raise(2, argv, th->vm->main_thread);
 }
 
+#if defined(POSIX_SIGNAL) && defined(SIGSEGV) && defined(HAVE_SIGALTSTACK)
+#define USE_SIGALTSTACK
+#endif
+
 void
 ruby_thread_stack_overflow(rb_thread_t *th)
 {
+    th->raised_flag = 0;
+#ifdef USE_SIGALTSTACK
+    th->raised_flag = 0;
+    rb_exc_raise(sysstack_error);
+#else
     th->errinfo = sysstack_error;
-    th->raised_flag = 0;
     TH_JUMP_TAG(th, TAG_RAISE);
+#endif
 }
 
 int
Index: ruby_1_9_1/version.h
===================================================================
--- ruby_1_9_1/version.h	(revision 23793)
+++ ruby_1_9_1/version.h	(revision 23794)
@@ -1,6 +1,6 @@
 #define RUBY_VERSION "1.9.1"
 #define RUBY_RELEASE_DATE "2009-05-22"
-#define RUBY_PATCHLEVEL 184
+#define RUBY_PATCHLEVEL 185
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 9
 #define RUBY_VERSION_TEENY 1

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

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