diff options
author | swills <swills@FreeBSD.org> | 2016-12-08 00:08:54 +0800 |
---|---|---|
committer | swills <swills@FreeBSD.org> | 2016-12-08 00:08:54 +0800 |
commit | 3f0830870e7db1890c6b6c8f18d055b6d5a779d0 (patch) | |
tree | 955359f95d076d2799cdaf105f7832e745fa556f /lang | |
parent | fe4ee6e2e272193a3508e0d938087bd47291a29a (diff) | |
download | freebsd-ports-gnome-3f0830870e7db1890c6b6c8f18d055b6d5a779d0.tar.gz freebsd-ports-gnome-3f0830870e7db1890c6b6c8f18d055b6d5a779d0.tar.zst freebsd-ports-gnome-3f0830870e7db1890c6b6c8f18d055b6d5a779d0.zip |
lang/ruby23: fix setjmp clobbered variables
PR: 206111
Submitted by: dim
Diffstat (limited to 'lang')
-rw-r--r-- | lang/ruby23/files/patch-eval.c | 20 | ||||
-rw-r--r-- | lang/ruby23/files/patch-eval_error.c | 15 | ||||
-rw-r--r-- | lang/ruby23/files/patch-thread.c | 13 | ||||
-rw-r--r-- | lang/ruby23/files/patch-vm_eval.c | 22 | ||||
-rw-r--r-- | lang/ruby23/files/patch-vm_trace.c | 11 |
5 files changed, 81 insertions, 0 deletions
diff --git a/lang/ruby23/files/patch-eval.c b/lang/ruby23/files/patch-eval.c new file mode 100644 index 000000000000..426c85f26003 --- /dev/null +++ b/lang/ruby23/files/patch-eval.c @@ -0,0 +1,20 @@ +--- eval.c.orig 2015-11-20 01:17:25.000000000 +0100 ++++ eval.c 2016-01-10 19:24:26.101707000 +0100 +@@ -788,7 +788,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; +@@ -854,7 +854,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/ruby23/files/patch-eval_error.c b/lang/ruby23/files/patch-eval_error.c new file mode 100644 index 000000000000..160d794a02ab --- /dev/null +++ b/lang/ruby23/files/patch-eval_error.c @@ -0,0 +1,15 @@ +--- eval_error.c.orig 2015-10-31 02:22:51.000000000 +0100 ++++ eval_error.c 2016-01-10 19:24:26.104099000 +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/ruby23/files/patch-thread.c b/lang/ruby23/files/patch-thread.c new file mode 100644 index 000000000000..40106c0dd043 --- /dev/null +++ b/lang/ruby23/files/patch-thread.c @@ -0,0 +1,13 @@ +--- thread.c.orig 2015-12-09 01:38:32.000000000 +0100 ++++ thread.c 2016-01-10 19:24:26.106834000 +0100 +@@ -466,8 +466,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; + volatile int sleeping = 0; + + if (vm->main_thread != th) { diff --git a/lang/ruby23/files/patch-vm_eval.c b/lang/ruby23/files/patch-vm_eval.c new file mode 100644 index 000000000000..f322e6b574aa --- /dev/null +++ b/lang/ruby23/files/patch-vm_eval.c @@ -0,0 +1,22 @@ +--- vm_eval.c.orig 2015-12-12 10:51:30.000000000 +0100 ++++ vm_eval.c 2016-01-10 19:24:26.109468000 +0100 +@@ -1267,7 +1267,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; +@@ -2001,8 +2001,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/ruby23/files/patch-vm_trace.c b/lang/ruby23/files/patch-vm_trace.c new file mode 100644 index 000000000000..2f3c3ec0f027 --- /dev/null +++ b/lang/ruby23/files/patch-vm_trace.c @@ -0,0 +1,11 @@ +--- vm_trace.c.orig 2015-12-14 03:52:14.000000000 +0100 ++++ vm_trace.c 2016-01-10 19:24:26.111975000 +0100 +@@ -389,7 +389,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; |