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

ruby-changes:32511

From: yugui <ko1@a...>
Date: Tue, 14 Jan 2014 11:32:50 +0900 (JST)
Subject: [ruby-changes:32511] yugui:r44590 (trunk): * vm_exec.c (cfp): Fixes a SEGV issue in r44554.

yugui	2014-01-14 11:32:45 +0900 (Tue, 14 Jan 2014)

  New Revision: 44590

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

  Log:
    * vm_exec.c (cfp): Fixes a SEGV issue in r44554.
      r11 can be broken by subroutine and sometimes causes SEGV at
      runtime.  Use r13 instead.

  Modified files:
    trunk/ChangeLog
    trunk/vm_exec.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44589)
+++ ChangeLog	(revision 44590)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Jan 14 11:28:44 2014  Yuki Yugui Sonoda  <yugui@g...>
+
+	* vm_exec.c (cfp): Fixes a SEGV issue in r44554.
+	  r11 can be broken by subroutine and sometimes causes SEGV at
+	  runtime.  Use r13 instead.
+
 Tue Jan 14 02:20:00 2014  Kenta Murata  <mrkn@m...>
 
 	* ext/bigdecimal/bigdecimal.c (BigDecimal_divide): Add an additional
Index: vm_exec.c
===================================================================
--- vm_exec.c	(revision 44589)
+++ vm_exec.c	(revision 44590)
@@ -47,7 +47,7 @@ vm_exec_core(rb_thread_t *th, VALUE init https://github.com/ruby/ruby/blob/trunk/vm_exec.c#L47
 
 #if OPT_STACK_CACHING
 #if 0
-#elif __GNUC__ && __x86_64__
+#elif __GNUC__ && __x86_64__ && !defined(__native_client__)
     DECL_SC_REG(VALUE, a, "12");
     DECL_SC_REG(VALUE, b, "13");
 #else
@@ -64,7 +64,7 @@ vm_exec_core(rb_thread_t *th, VALUE init https://github.com/ruby/ruby/blob/trunk/vm_exec.c#L64
 #elif defined(__GNUC__) && defined(__x86_64__)
     DECL_SC_REG(VALUE *, pc, "14");
 # if defined(__native_client__)
-    DECL_SC_REG(rb_control_frame_t *, cfp, "11");
+    DECL_SC_REG(rb_control_frame_t *, cfp, "13");
 # else
     DECL_SC_REG(rb_control_frame_t *, cfp, "15");
 # endif

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

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