diff options
author | swills <swills@FreeBSD.org> | 2016-12-08 10:57:06 +0800 |
---|---|---|
committer | swills <swills@FreeBSD.org> | 2016-12-08 10:57:06 +0800 |
commit | 93bdbd7bc17abb608ddb0e739fb62d0cfd81b3a3 (patch) | |
tree | dfaa23b7943e7f01d7111b48aa0d44cec4bc0688 /lang | |
parent | 145b69cfe12ab73de31b128b820c0e9544fc9462 (diff) | |
download | freebsd-ports-gnome-93bdbd7bc17abb608ddb0e739fb62d0cfd81b3a3.tar.gz freebsd-ports-gnome-93bdbd7bc17abb608ddb0e739fb62d0cfd81b3a3.tar.zst freebsd-ports-gnome-93bdbd7bc17abb608ddb0e739fb62d0cfd81b3a3.zip |
lang/ruby21: fix setjmp clobbered variables
PR: 206108
Submitted by: dim
Diffstat (limited to 'lang')
-rw-r--r-- | lang/ruby21/files/patch-eval.c | 20 | ||||
-rw-r--r-- | lang/ruby21/files/patch-eval_error.c | 15 | ||||
-rw-r--r-- | lang/ruby21/files/patch-thread.c | 13 | ||||
-rw-r--r-- | lang/ruby21/files/patch-vm_eval.c | 31 | ||||
-rw-r--r-- | lang/ruby21/files/patch-vm_trace.c | 11 |
5 files changed, 90 insertions, 0 deletions
diff --git a/lang/ruby21/files/patch-eval.c b/lang/ruby21/files/patch-eval.c new file mode 100644 index 000000000000..1ba8a8b17e9b --- /dev/null +++ b/lang/ruby21/files/patch-eval.c @@ -0,0 +1,20 @@ +--- eval.c.orig 2015-01-21 17:09:59.000000000 +0100 ++++ eval.c 2016-01-09 22:22:34.009232000 +0100 +@@ -743,7 +743,7 @@ rb_rescue2(VALUE (* b_proc) (ANYARGS), V + { + int state; + rb_thread_t *th = GET_THREAD(); +- rb_control_frame_t *cfp = th->cfp; ++ rb_control_frame_t *volatile cfp = th->cfp; + volatile VALUE result = Qfalse; + volatile VALUE e_info = th->errinfo; + va_list args; +@@ -809,7 +809,7 @@ rb_protect(VALUE (* proc) (VALUE), VALUE + volatile VALUE result = Qnil; + volatile int status; + rb_thread_t *th = GET_THREAD(); +- rb_control_frame_t *cfp = th->cfp; ++ rb_control_frame_t *volatile cfp = th->cfp; + struct rb_vm_protect_tag protect_tag; + rb_jmpbuf_t org_jmpbuf; + diff --git a/lang/ruby21/files/patch-eval_error.c b/lang/ruby21/files/patch-eval_error.c new file mode 100644 index 000000000000..6c64e6d450e9 --- /dev/null +++ b/lang/ruby21/files/patch-eval_error.c @@ -0,0 +1,15 @@ +--- eval_error.c.orig 2013-06-24 15:03:35.000000000 +0200 ++++ eval_error.c 2016-01-10 01:00:43.200335000 +0100 +@@ -80,9 +80,9 @@ static void + error_print(void) + { + volatile VALUE errat = Qundef; +- rb_thread_t *th = GET_THREAD(); +- VALUE errinfo = th->errinfo; +- int raised_flag = th->raised_flag; ++ rb_thread_t *volatile th = GET_THREAD(); ++ volatile VALUE errinfo = th->errinfo; ++ volatile int raised_flag = th->raised_flag; + volatile VALUE eclass = Qundef, e = Qundef; + const char *volatile einfo; + volatile long elen; diff --git a/lang/ruby21/files/patch-thread.c b/lang/ruby21/files/patch-thread.c new file mode 100644 index 000000000000..93441f873fb5 --- /dev/null +++ b/lang/ruby21/files/patch-thread.c @@ -0,0 +1,13 @@ +--- thread.c.orig 2015-03-09 18:40:36.000000000 +0100 ++++ thread.c 2016-01-10 18:50:57.451040000 +0100 +@@ -420,8 +420,8 @@ rb_threadptr_unlock_all_locking_mutexes( + void + rb_thread_terminate_all(void) + { +- rb_thread_t *th = GET_THREAD(); /* main thread */ +- rb_vm_t *vm = th->vm; ++ rb_thread_t *volatile th = GET_THREAD(); /* main thread */ ++ rb_vm_t *volatile vm = th->vm; + + if (vm->main_thread != th) { + rb_bug("rb_thread_terminate_all: called by child thread (%p, %p)", diff --git a/lang/ruby21/files/patch-vm_eval.c b/lang/ruby21/files/patch-vm_eval.c new file mode 100644 index 000000000000..d5a49d0027a3 --- /dev/null +++ b/lang/ruby21/files/patch-vm_eval.c @@ -0,0 +1,31 @@ +--- vm_eval.c.orig 2015-07-03 10:55:40.000000000 +0200 ++++ vm_eval.c 2016-01-10 18:53:23.030473000 +0100 +@@ -1062,7 +1062,7 @@ rb_iterate(VALUE (* it_proc) (VALUE), VA + int state; + volatile VALUE retval = Qnil; + NODE *node = NEW_IFUNC(bl_proc, data2); +- rb_thread_t *th = GET_THREAD(); ++ rb_thread_t *volatile th = GET_THREAD(); + rb_control_frame_t *volatile cfp = th->cfp; + + node->nd_aid = rb_frame_this_func(); +@@ -1190,7 +1190,7 @@ eval_string_with_cref(VALUE self, VALUE + int state; + VALUE result = Qundef; + VALUE envval; +- rb_thread_t *th = GET_THREAD(); ++ rb_thread_t *volatile th = GET_THREAD(); + rb_env_t *env = NULL; + rb_block_t block, *base_block; + volatile int parse_in_eval; +@@ -1843,8 +1843,8 @@ rb_catch_protect(VALUE t, rb_block_call_ + { + int state; + volatile VALUE val = Qnil; /* OK */ +- rb_thread_t *th = GET_THREAD(); +- rb_control_frame_t *saved_cfp = th->cfp; ++ rb_thread_t *volatile th = GET_THREAD(); ++ rb_control_frame_t *volatile saved_cfp = th->cfp; + volatile VALUE tag = t; + + TH_PUSH_TAG(th); diff --git a/lang/ruby21/files/patch-vm_trace.c b/lang/ruby21/files/patch-vm_trace.c new file mode 100644 index 000000000000..7de08ebc438f --- /dev/null +++ b/lang/ruby21/files/patch-vm_trace.c @@ -0,0 +1,11 @@ +--- vm_trace.c.orig 2015-11-18 12:26:40.000000000 +0100 ++++ vm_trace.c 2016-01-10 18:54:08.421021000 +0100 +@@ -392,7 +392,7 @@ rb_suppress_tracing(VALUE (*func)(VALUE) + volatile int raised; + volatile int outer_state; + VALUE result = Qnil; +- rb_thread_t *th = GET_THREAD(); ++ rb_thread_t *volatile th = GET_THREAD(); + int state; + const int tracing = th->trace_arg ? 1 : 0; + rb_trace_arg_t dummy_trace_arg; |