diff options
author | Aaron Patterson <tenderlove@ruby-lang.org> | 2021-06-07 11:46:01 -0700 |
---|---|---|
committer | Aaron Patterson <tenderlove@ruby-lang.org> | 2021-06-07 11:47:16 -0700 |
commit | 459a9f82c91bddabef0fe1d394c23b0adce96b7c (patch) | |
tree | ce1ca0de77ec2ab7963b779fb4910d172ef55b28 /vm_dump.c | |
parent | 26fcec5ae5edb9269f5fb91e2ea4827be05e3a59 (diff) |
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
Diffstat (limited to 'vm_dump.c')
-rw-r--r-- | vm_dump.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |