diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-14 01:38:14 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-14 01:38:14 +0000 |
commit | 497f8904cb3f90a3abf5340a129811aceb96ee33 (patch) | |
tree | 945836041c123c912fc376fdd5a17c27d69f17de /vm_trace.c | |
parent | 1e7ef5882e18b318f68804aada885eee47045593 (diff) | |
download | ruby-497f8904cb3f90a3abf5340a129811aceb96ee33.tar.gz |
* vm_trace.c (exec_hooks): add volatile to avoid segv.
On test-all with -j, it may crash in TH_POP_TAG.
Detailed mechanism is not known but this fixes it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_trace.c')
-rw-r--r-- | vm_trace.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vm_trace.c b/vm_trace.c index 717723c635..f5260149b3 100644 --- a/vm_trace.c +++ b/vm_trace.c @@ -244,7 +244,7 @@ clean_hooks(rb_hook_list_t *list) static int exec_hooks(rb_thread_t *th, rb_hook_list_t *list, const rb_trace_arg_t *trace_arg, int can_clean_hooks) { - int state; + volatile int state; volatile int raised; if (UNLIKELY(list->need_clean > 0) && can_clean_hooks) { @@ -275,6 +275,9 @@ exec_hooks(rb_thread_t *th, rb_hook_list_t *list, const rb_trace_arg_t *trace_ar if (raised) { rb_threadptr_set_raised(th); } + { + rb_thread_t volatile *tmp = th; + } return state; } |