[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Need help fixing ruby2.3 please



Index: ruby-2.3.0/localeinit.c
===================================================================
--- ruby-2.3.0.orig/localeinit.c
+++ ruby-2.3.0/localeinit.c
@@ -89,7 +89,7 @@ enc_find_index(const char *name)
 }
 
 int
-rb_locale_charmap_index(VALUE klass)
+rb_locale_charmap_index(void)
 {
     return (int)locale_charmap(enc_find_index);
 }
Index: ruby-2.3.0/thread_pthread.c
===================================================================
--- ruby-2.3.0.orig/thread_pthread.c
+++ ruby-2.3.0/thread_pthread.c
@@ -691,16 +691,15 @@ reserve_stack(volatile char *limit, size
 	limit += size;
 	if (limit > end) {
 	    size = limit - end;
-	    limit = alloca(size);
+	    limit = alloca(stack_check_margin+size);
 	    limit[stack_check_margin+size-1] = 0;
 	}
     }
     else {
 	limit -= size;
 	if (buf > limit) {
-	    limit = alloca(buf - limit);
+	    limit = alloca(buf - limit + stack_check_margin);
 	    limit[0] = 0; /* ensure alloca is called */
-	    limit -= stack_check_margin;
 	}
     }
 }

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Reply to: