John Paul Adrian Glaubitz <[email protected]> writes:

> root@pacman:~> ruby2.2 --help
> Segmentation fault

Do you have this patch?

Index: ruby-2.2.3/thread_pthread.c
===================================================================
--- ruby-2.2.3.orig/thread_pthread.c
+++ ruby-2.2.3/thread_pthread.c
@@ -678,15 +678,14 @@ 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 -= stack_check_margin;
+           limit = alloca(buf - limit + stack_check_margin);
            limit[0] = 0;
        }
     }

Andreas.

-- 
Andreas Schwab, [email protected]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

Reply via email to