diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-27 10:49:55 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-27 10:49:55 +0000 |
commit | 04d79490da2013588fe9962580dc15193674fde0 (patch) | |
tree | 89e3b5f2ae815eac1ff4559789ee290380b7fe75 /thread.c | |
parent | ed8c211a645cfb0528128306789d73441afadf31 (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_2@57216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -462,8 +462,8 @@ rb_threadptr_unlock_all_locking_mutexes(rb_thread_t *th) void rb_thread_terminate_all(void) { - rb_thread_t *th = GET_THREAD(); /* main thread */ - rb_vm_t *vm = th->vm; + rb_thread_t *volatile th = GET_THREAD(); /* main thread */ + rb_vm_t *volatile vm = th->vm; if (vm->main_thread != th) { rb_bug("rb_thread_terminate_all: called by child thread (%p, %p)", |