1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* vm_trace.c (rb_threadptr_exec_event_hooks): get rid of race

condition. [Bug #7589] [ruby-dev:46763]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tarui 2012-12-19 08:54:57 +00:00
parent 8255e83912
commit e9e4ea981e
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Wed Dec 19 17:54:18 2012 Masaya Tarui <tarui@ruby-lang.org>
* vm_trace.c (rb_threadptr_exec_event_hooks): get rid of race
condition. [Bug #7589] [ruby-dev:46763]
Wed Dec 19 16:30:28 2012 Eric Hodel <drbrain@segment7.net>
* doc/syntax/literals.rdoc: Added 0d decimal format. Thanks Nobu!

View file

@ -291,7 +291,7 @@ rb_threadptr_exec_event_hooks(rb_trace_arg_t *targ)
int state = 0;
th->state = 0;
th->vm->trace_running = 1;
th->vm->trace_running++;
th->trace_running = 1;
{
rb_hook_list_t *list;
@ -313,7 +313,7 @@ rb_threadptr_exec_event_hooks(rb_trace_arg_t *targ)
}
terminate:
th->trace_running = 0;
th->vm->trace_running = vm_tracing;
th->vm->trace_running--;
if (state) {
TH_JUMP_TAG(th, state);