summaryrefslogtreecommitdiff
path: root/vm_trace.c
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-07 23:27:51 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-07 23:27:51 +0000
commit472959f9c20e7aff1776312d6c8e2236a52e29a7 (patch)
treede3ac74b5f70b9251972088215a294d7e6fb3ba8 /vm_trace.c
parente8914fb351bfcd7ff198feac208c55d4bc396dbd (diff)
Add clang volatile fixes from FreeBSD and NetBSD.
Use volatile instead of optnone to avoid optimization which causes segmentation faults. Patch by Dimitry Andric. [ruby-core:78531] [Bug #13014] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_trace.c')
-rw-r--r--vm_trace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_trace.c b/vm_trace.c
index aca6367b08..02bf54e968 100644
--- a/vm_trace.c
+++ b/vm_trace.c
@@ -389,7 +389,7 @@ rb_suppress_tracing(VALUE (*func)(VALUE), VALUE arg)
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;