Don't create objects during GC

If we crash during GC, allocating new objects in the segv handler can
cause an infinite loop.  This commit is to avoid creating new objects in
the crash handler
This commit is contained in:
Aaron Patterson 2021-06-07 11:46:01 -07:00
parent 26fcec5ae5
commit 459a9f82c9
No known key found for this signature in database
GPG Key ID: 953170BCB4FFAFC6

View File

@ -1048,7 +1048,7 @@ rb_vm_bugreport(const void *ctx)
fprintf(stderr, "-- Other runtime information "
"-----------------------------------------------\n\n");
}
if (vm) {
if (vm && !rb_during_gc()) {
int i;
VALUE name;
long len;