summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortarui <tarui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-19 08:54:57 +0000
committertarui <tarui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-19 08:54:57 +0000
commite9e4ea981ed45edd35f177992ca2002a82283c8f (patch)
tree22b37703a6d19bf30644bc9354b071e8f8d766b7
parent8255e83912f908a6ea50f7989ac27b8587fca2b6 (diff)
* 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
-rw-r--r--ChangeLog5
-rw-r--r--vm_trace.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index b304fbdad7b..4ed25a3091f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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!
diff --git a/vm_trace.c b/vm_trace.c
index 861ee0511ac..9186983e28f 100644
--- a/vm_trace.c
+++ b/vm_trace.c
@@ -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);