1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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.
This commit is contained in:
Takashi Kokubun 2021-06-02 21:39:11 -07:00
parent b957c3dbcb
commit 007e439fe9
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD

View file

@ -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();