mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Handle (empty) backtrace when thread is not born yet.
This commit is contained in:
parent
5855af73b8
commit
9cb4e7725f
1 changed files with 6 additions and 0 deletions
|
@ -451,6 +451,12 @@ backtrace_each(const rb_execution_context_t *ec,
|
||||||
const rb_control_frame_t *cfp;
|
const rb_control_frame_t *cfp;
|
||||||
ptrdiff_t size, i;
|
ptrdiff_t size, i;
|
||||||
|
|
||||||
|
// In the case the thread vm_stack or cfp is not initialized, there is no backtrace.
|
||||||
|
if (start_cfp == NULL) {
|
||||||
|
init(arg, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* <- start_cfp (end control frame)
|
/* <- start_cfp (end control frame)
|
||||||
* top frame (dummy)
|
* top frame (dummy)
|
||||||
* top frame (dummy)
|
* top frame (dummy)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue