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

(-)lang/ruby21/files/patch-eval.c (+20 lines)
Line 0 Link Here
1
--- eval.c.orig	2015-01-21 17:09:59.000000000 +0100
2
+++ eval.c	2016-01-09 22:22:34.009232000 +0100
3
@@ -743,7 +743,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
@@ -809,7 +809,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/ruby21/files/patch-eval_error.c (+15 lines)
Line 0 Link Here
1
--- eval_error.c.orig	2013-06-24 15:03:35.000000000 +0200
2
+++ eval_error.c	2016-01-10 01:00:43.200335000 +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/ruby21/files/patch-thread.c (+13 lines)
Line 0 Link Here
1
--- thread.c.orig	2015-03-09 18:40:36.000000000 +0100
2
+++ thread.c	2016-01-10 18:50:57.451040000 +0100
3
@@ -420,8 +420,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/ruby21/files/patch-vm_eval.c (+31 lines)
Line 0 Link Here
1
--- vm_eval.c.orig	2015-07-03 10:55:40.000000000 +0200
2
+++ vm_eval.c	2016-01-10 18:53:23.030473000 +0100
3
@@ -1062,7 +1062,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
@@ -1190,7 +1190,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
@@ -1843,8 +1843,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/ruby21/files/patch-vm_trace.c (+11 lines)
Line 0 Link Here
1
--- vm_trace.c.orig	2015-11-18 12:26:40.000000000 +0100
2
+++ vm_trace.c	2016-01-10 18:54:08.421021000 +0100
3
@@ -392,7 +392,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 206108