mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Allow an MJIT worker to show a backtrace on SEGV
An MJIT worker thread doesn't have ec, and it's required for SDR() and rb_backtrace_print_as_bugreport(). Therefore it must be checked.
This commit is contained in:
parent
4439b78336
commit
885135f84c
1 changed files with 2 additions and 1 deletions
|
@ -941,8 +941,9 @@ rb_vm_bugreport(const void *ctx)
|
|||
enum {other_runtime_info = 0};
|
||||
#endif
|
||||
const rb_vm_t *const vm = GET_VM();
|
||||
const rb_execution_context_t *ec = GET_EC();
|
||||
|
||||
if (vm) {
|
||||
if (vm && ec) {
|
||||
SDR();
|
||||
rb_backtrace_print_as_bugreport();
|
||||
fputs("\n", stderr);
|
||||
|
|
Loading…
Add table
Reference in a new issue