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
@ -941,8 +941,9 @@ rb_vm_bugreport(const void *ctx)
|
|||||||
enum {other_runtime_info = 0};
|
enum {other_runtime_info = 0};
|
||||||
#endif
|
#endif
|
||||||
const rb_vm_t *const vm = GET_VM();
|
const rb_vm_t *const vm = GET_VM();
|
||||||
|
const rb_execution_context_t *ec = GET_EC();
|
||||||
|
|
||||||
if (vm) {
|
if (vm && ec) {
|
||||||
SDR();
|
SDR();
|
||||||
rb_backtrace_print_as_bugreport();
|
rb_backtrace_print_as_bugreport();
|
||||||
fputs("\n", stderr);
|
fputs("\n", stderr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user