ruby-changes:26413
From: tarui <ko1@a...>
Date: Wed, 19 Dec 2012 17:55:09 +0900 (JST)
Subject: [ruby-changes:26413] tarui:r38464 (trunk): * vm_trace.c (rb_threadptr_exec_event_hooks): get rid of race
tarui 2012-12-19 17:54:57 +0900 (Wed, 19 Dec 2012) New Revision: 38464 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38464 Log: * vm_trace.c (rb_threadptr_exec_event_hooks): get rid of race condition. [Bug #7589] [ruby-dev:46763] Modified files: trunk/ChangeLog trunk/vm_trace.c Index: ChangeLog =================================================================== --- ChangeLog (revision 38463) +++ ChangeLog (revision 38464) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Dec 19 17:54:18 2012 Masaya Tarui <tarui@r...> + + * 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@s...> * doc/syntax/literals.rdoc: Added 0d decimal format. Thanks Nobu! Index: vm_trace.c =================================================================== --- vm_trace.c (revision 38463) +++ vm_trace.c (revision 38464) @@ -291,7 +291,7 @@ rb_threadptr_exec_event_hooks(rb_trace_a https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L291 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_a https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L313 } terminate: th->trace_running = 0; - th->vm->trace_running = vm_tracing; + th->vm->trace_running--; if (state) { TH_JUMP_TAG(th, state); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/