summaryrefslogtreecommitdiff
path: root/vm_backtrace.c
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-27 00:13:51 (GMT)
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-27 00:13:51 (GMT)
commitc03f86b389d00cf45edf133c9aa23479e6efc06e (patch)
tree3d80b4ebabfcc430bb8d8def5116f7f6e3566283 /vm_backtrace.c
parent707cbe6f990de42a927405bea75dd6c64a8944bf (diff)
Revert "Fix use of `rb_profile_frames` start parameter"
This reverts commit r63265. ko1 said I should not have committed this! I'm sorry! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_backtrace.c')
-rw-r--r--vm_backtrace.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vm_backtrace.c b/vm_backtrace.c
index 3a13088..5934029 100644
--- a/vm_backtrace.c
+++ b/vm_backtrace.c
@@ -1276,7 +1276,7 @@ rb_profile_frames(int start, int limit, VALUE *buff, int *lines)
const rb_control_frame_t *cfp = ec->cfp, *end_cfp = RUBY_VM_END_CONTROL_FRAME(ec);
const rb_callable_method_entry_t *cme;
- for (i=0; i<limit && cfp != end_cfp; cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp)) {
+ for (i=0; i<limit && cfp != end_cfp;) {
if (cfp->iseq && cfp->pc) {
if (start > 0) {
start--;
@@ -1296,6 +1296,7 @@ rb_profile_frames(int start, int limit, VALUE *buff, int *lines)
i++;
}
+ cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp);
}
return i;