summaryrefslogtreecommitdiff
path: root/vm_dump.c
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2021-06-02 21:39:11 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2021-06-02 21:50:40 -0700
commit007e439fe965871c73127928f7244ebb96a86e58 (patch)
tree7461bfc4a1bd2c4e0a44f86b34581883c9fdecb5 /vm_dump.c
parentb957c3dbcb3cfee6908f4217cfb9ab0e78b4c618 (diff)
downloadruby-007e439fe965871c73127928f7244ebb96a86e58.tar.gz
Do not expect ec on rb_vm_bugreport
because a SEGV might happen on an MJIT worker. As you can clearly see from `if (vm && ec) {`, ec is not guaranteed to exist here.
Diffstat (limited to 'vm_dump.c')
-rw-r--r--vm_dump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_dump.c b/vm_dump.c
index 26a2bf3ba4..a3aaf1497e 100644
--- a/vm_dump.c
+++ b/vm_dump.c
@@ -1025,7 +1025,7 @@ 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();
+ const rb_execution_context_t *ec = rb_current_execution_context(false);
if (vm && ec) {
SDR();