-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Fix VMDEBUG #13147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Fix VMDEBUG #13147
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -381,6 +381,8 @@ vm_stack_dump_each(const rb_execution_context_t *ec, const rb_control_frame_t *c | |
else { | ||
rb_bug("unsupported frame type: %08lx", VM_FRAME_TYPE(cfp)); | ||
} | ||
error: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
return; | ||
} | ||
#endif | ||
|
||
|
@@ -440,7 +442,7 @@ rb_vmdebug_debug_print_pre(const rb_execution_context_t *ec, const rb_control_fr | |
|
||
#if VMDEBUG > 3 | ||
kprintf(" (1)"); | ||
rb_vmdebug_debug_print_register(errout, ec); | ||
rb_vmdebug_debug_print_register(ec, errout); | ||
#endif | ||
return true; | ||
|
||
|
@@ -452,12 +454,12 @@ bool | |
rb_vmdebug_debug_print_post(const rb_execution_context_t *ec, const rb_control_frame_t *cfp, FILE *errout) | ||
{ | ||
#if VMDEBUG > 9 | ||
if (!rb_vmdebug_stack_dump_raw(ec, cfp, errout)) goto errout; | ||
if (!rb_vmdebug_stack_dump_raw(ec, cfp, errout)) goto error; | ||
#endif | ||
|
||
#if VMDEBUG > 3 | ||
kprintf(" (2)"); | ||
rb_vmdebug_debug_print_register(errout, ec); | ||
rb_vmdebug_debug_print_register(ec, errout); | ||
#endif | ||
/* stack_dump_raw(ec, cfp); */ | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -430,7 +430,7 @@ vm_push_frame(rb_execution_context_t *ec, | |
|
||
ec->cfp = cfp; | ||
|
||
if (VMDEBUG == 2) { | ||
if (VMDEBUG == 2 && rb_current_execution_context(false) != NULL) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Without this I get:
It happens during vm init, pushing a dummy frame before |
||
SDR(); | ||
} | ||
vm_push_frame_debug_counter_inc(ec, cfp, type); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We end up in this branch fairly frequently with
pos == 0
. I've removed it for now, otherwise this will terminate any program right away.