View | Details | Raw Unified | Return to bug 206110
Collapse All | Expand All

(-)lang/ruby22/files/patch-eval.c (+20 lines)
Line 0 Link Here
1
--- eval.c.orig	2014-12-09 02:16:27.000000000 +0100
2
+++ eval.c	2016-01-10 19:10:59.326340000 +0100
3
@@ -797,7 +797,7 @@ rb_rescue2(VALUE (* b_proc) (ANYARGS), V
4
 {
5
     int state;
6
     rb_thread_t *th = GET_THREAD();
7
-    rb_control_frame_t *cfp = th->cfp;
8
+    rb_control_frame_t *volatile cfp = th->cfp;
9
     volatile VALUE result = Qfalse;
10
     volatile VALUE e_info = th->errinfo;
11
     va_list args;
12
@@ -863,7 +863,7 @@ rb_protect(VALUE (* proc) (VALUE), VALUE
13
     volatile VALUE result = Qnil;
14
     volatile int status;
15
     rb_thread_t *th = GET_THREAD();
16
-    rb_control_frame_t *cfp = th->cfp;
17
+    rb_control_frame_t *volatile cfp = th->cfp;
18
     struct rb_vm_protect_tag protect_tag;
19
     rb_jmpbuf_t org_jmpbuf;
20
 
(-)lang/ruby22/files/patch-eval_error.c (+15 lines)
Line 0 Link Here
1
--- eval_error.c.orig	2015-01-17 08:47:29.000000000 +0100
2
+++ eval_error.c	2016-01-10 19:11:10.416384000 +0100
3
@@ -80,9 +80,9 @@ static void
4
 error_print(void)
5
 {
6
     volatile VALUE errat = Qundef;
7
-    rb_thread_t *th = GET_THREAD();
8
-    VALUE errinfo = th->errinfo;
9
-    int raised_flag = th->raised_flag;
10
+    rb_thread_t *volatile th = GET_THREAD();
11
+    volatile VALUE errinfo = th->errinfo;
12
+    volatile int raised_flag = th->raised_flag;
13
     volatile VALUE eclass = Qundef, e = Qundef;
14
     const char *volatile einfo;
15
     volatile long elen;
(-)lang/ruby22/files/patch-thread.c (+13 lines)
Line 0 Link Here
1
--- thread.c.orig	2015-02-20 14:53:23.000000000 +0100
2
+++ thread.c	2016-01-10 19:11:32.423524000 +0100
3
@@ -462,8 +462,8 @@ rb_threadptr_unlock_all_locking_mutexes(
4
 void
5
 rb_thread_terminate_all(void)
6
 {
7
-    rb_thread_t *th = GET_THREAD(); /* main thread */
8
-    rb_vm_t *vm = th->vm;
9
+    rb_thread_t *volatile th = GET_THREAD(); /* main thread */
10
+    rb_vm_t *volatile vm = th->vm;
11
 
12
     if (vm->main_thread != th) {
13
 	rb_bug("rb_thread_terminate_all: called by child thread (%p, %p)",
(-)lang/ruby22/files/patch-vm_eval.c (+31 lines)
Line 0 Link Here
1
--- vm_eval.c.orig	2015-11-29 10:01:12.000000000 +0100
2
+++ vm_eval.c	2016-01-10 19:11:40.066355000 +0100
3
@@ -1111,7 +1111,7 @@ rb_iterate(VALUE (* it_proc) (VALUE), VA
4
     int state;
5
     volatile VALUE retval = Qnil;
6
     NODE *node = NEW_IFUNC(bl_proc, data2);
7
-    rb_thread_t *th = GET_THREAD();
8
+    rb_thread_t *volatile th = GET_THREAD();
9
     rb_control_frame_t *volatile cfp = th->cfp;
10
 
11
     node->nd_aid = rb_frame_this_func();
12
@@ -1239,7 +1239,7 @@ eval_string_with_cref(VALUE self, VALUE 
13
     int state;
14
     VALUE result = Qundef;
15
     VALUE envval;
16
-    rb_thread_t *th = GET_THREAD();
17
+    rb_thread_t *volatile th = GET_THREAD();
18
     rb_env_t *env = NULL;
19
     rb_block_t block, *base_block;
20
     volatile int parse_in_eval;
21
@@ -1983,8 +1983,8 @@ rb_catch_protect(VALUE t, rb_block_call_
22
 {
23
     int state;
24
     volatile VALUE val = Qnil;		/* OK */
25
-    rb_thread_t *th = GET_THREAD();
26
-    rb_control_frame_t *saved_cfp = th->cfp;
27
+    rb_thread_t *volatile th = GET_THREAD();
28
+    rb_control_frame_t *volatile saved_cfp = th->cfp;
29
     volatile VALUE tag = t;
30
 
31
     TH_PUSH_TAG(th);
(-)lang/ruby22/files/patch-vm_trace.c (+11 lines)
Line 0 Link Here
1
--- vm_trace.c.orig	2015-11-08 15:49:09.000000000 +0100
2
+++ vm_trace.c	2016-01-10 19:11:46.862754000 +0100
3
@@ -390,7 +390,7 @@ rb_suppress_tracing(VALUE (*func)(VALUE)
4
     volatile int raised;
5
     volatile int outer_state;
6
     VALUE result = Qnil;
7
-    rb_thread_t *th = GET_THREAD();
8
+    rb_thread_t *volatile th = GET_THREAD();
9
     int state;
10
     const int tracing = th->trace_arg ? 1 : 0;
11
     rb_trace_arg_t dummy_trace_arg;

Return to bug 206110