From 04d79490da2013588fe9962580dc15193674fde0 Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 27 Dec 2016 10:49:55 +0000 Subject: merge revision(s) 57020,57021: [Backport #13014] 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/branches/ruby_2_2@57216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vm_trace.c') diff --git a/vm_trace.c b/vm_trace.c index 3c0287d69c..3b0eadfea7 100644 --- a/vm_trace.c +++ b/vm_trace.c @@ -390,7 +390,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; -- cgit v1.2.3