summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-16 19:29:32 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-16 19:29:32 +0000
commit8cc9818463fc72c08118ae83cd6a1d8c91106d86 (patch)
tree9eadedbc19286c24b3799056df723e5f0ef5db1f /eval.c
parentbc059aa6d5a5987628b19108b5448915ae3012af (diff)
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_3@57347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index 8f94269eb1..e3dbb9eb66 100644
--- a/eval.c
+++ b/eval.c
@@ -804,7 +804,7 @@ rb_rescue2(VALUE (* b_proc) (ANYARGS), VALUE data1,
{
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;
@@ -870,7 +870,7 @@ rb_protect(VALUE (* proc) (VALUE), VALUE data, int * state)
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;