aboutsummaryrefslogtreecommitdiffstats
path: root/vm_trace.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-07 06:24:46 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-07 06:24:46 +0000
commitb8e6fd6ffe9f24921c7138f656596ae3bbdd7ad7 (patch)
tree43f798a0c4f654657a8e6c27dadb871ac3df7f3f /vm_trace.c
parent6e4b187bfe582614a491008a68292e8e67a6cfb0 (diff)
downloadruby-b8e6fd6ffe9f24921c7138f656596ae3bbdd7ad7.tar.gz
* vm_trace.c (rb_threadptr_exec_event_hooks_orig): pop tag before
JUMP_TAG() if frame is `finish' frame. Without this patch, there is an inconsistency between control frame stack and tags stack. [Bug #7668] * test/ruby/test_settracefunc.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_trace.c')
-rw-r--r--vm_trace.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/vm_trace.c b/vm_trace.c
index ad0fce0713..425ca9fae0 100644
--- a/vm_trace.c
+++ b/vm_trace.c
@@ -316,7 +316,12 @@ rb_threadptr_exec_event_hooks_orig(rb_trace_arg_t *trace_arg, int pop_p)
th->vm->trace_running--;
if (state) {
- if (pop_p) th->cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(th->cfp);
+ if (pop_p) {
+ if (VM_FRAME_TYPE_FINISH_P(th->cfp)) {
+ th->tag = th->tag->prev;
+ }
+ th->cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(th->cfp);
+ }
TH_JUMP_TAG(th, state);
}
th->state = outer_state;