Crash more nicely when the VM isn't fully set up

If we crash but the VM isn't fully alive, we can get an infinite loop.
This commit is contained in:
Aaron Patterson 2021-06-10 16:03:11 -07:00
parent 929cc615a7
commit d74e5d5b4f
No known key found for this signature in database
GPG Key ID: 953170BCB4FFAFC6
1 changed files with 32 additions and 30 deletions

View File

@ -1062,6 +1062,7 @@ rb_vm_bugreport(const void *ctx)
LIMITED_NAME_LENGTH(name), RSTRING_PTR(name));
fprintf(stderr, "\n");
}
if (vm->loaded_features) {
fprintf(stderr, "* Loaded features:\n\n");
for (i=0; i<RARRAY_LEN(vm->loaded_features); i++) {
name = RARRAY_AREF(vm->loaded_features, i);
@ -1092,6 +1093,7 @@ rb_vm_bugreport(const void *ctx)
(void *)name);
}
}
}
fprintf(stderr, "\n");
}