summaryrefslogtreecommitdiff
path: root/vm_dump.c
diff options
context:
space:
mode:
authorAlan Wu <[email protected]>2022-03-29 13:38:55 -0400
committerAlan Wu <[email protected]>2022-06-03 13:50:32 -0400
commite4fe3473027393aa084f4e6b2a01c29ec8281f99 ()
treeed4f3ada4891a93b9d0242353468553b04937e8e /vm_dump.c
parent9125374726fbf68c05ee7585d4a374ffc5efc5db (diff)
Prevent printing crash report in a loop
In the event that we are crashing due to a corrupt Ruby stack, we might re-enter rb_vm_bugreport() due to failed assertions in rb_backtrace_print_as_bugreport() or SDR(). In these cases we were printing the bug report ad infinitum with unbounded recusion. I seem to run into this every once in a while and the amount of log it prints out is pretty distracting. On CI environments it makes the log output unnecessarily big. Let's fix this.
Notes: Merged: https://.com/ruby/ruby/pull/5731
-rw-r--r--vm_dump.c11
1 files changed, 11 insertions, 0 deletions
@@ -1021,6 +1021,17 @@ rb_vm_bugreport(const void *ctx)
}
}
#ifdef __linux__
# define PROC_MAPS_NAME "/proc/self/maps"
#endif