From 459a9f82c91bddabef0fe1d394c23b0adce96b7c Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 7 Jun 2021 11:46:01 -0700 Subject: 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 --- vm_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vm_dump.c') diff --git a/vm_dump.c b/vm_dump.c index a3aaf1497e..ea94ee1985 100644 --- a/vm_dump.c +++ b/vm_dump.c @@ -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; -- cgit v1.2.3