diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-07 23:27:51 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-07 23:27:51 +0000 |
commit | 472959f9c20e7aff1776312d6c8e2236a52e29a7 (patch) | |
tree | de3ac74b5f70b9251972088215a294d7e6fb3ba8 /eval_error.c | |
parent | e8914fb351bfcd7ff198feac208c55d4bc396dbd (diff) | |
download | ruby-472959f9c20e7aff1776312d6c8e2236a52e29a7.tar.gz |
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 'eval_error.c')
-rw-r--r-- | eval_error.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/eval_error.c b/eval_error.c index c469474159..ff3db23a6b 100644 --- a/eval_error.c +++ b/eval_error.c @@ -73,10 +73,10 @@ error_print(rb_thread_t *th) } void -rb_threadptr_error_print(rb_thread_t *th, VALUE errinfo) +rb_threadptr_error_print(rb_thread_t *volatile th, volatile VALUE errinfo) { volatile VALUE errat = Qundef; - int raised_flag = th->raised_flag; + volatile int raised_flag = th->raised_flag; volatile VALUE eclass = Qundef, e = Qundef; const char *volatile einfo; volatile long elen; |