summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2024-12-11 16:12:04 +0900
committerNobuyoshi Nakada <[email protected]>2024-12-11 16:12:04 +0900
commitf243733564940401d914686837b701bc31311248 (patch)
tree8623ca7908e6a3fd31e5edbb5f4af8432a5a8c00 /gc.c
parentc2a5d4cdc0e7f5e8b0937f4b395e2f062472d6e7 (diff)
[Bug #20941] Bail out when recursing no memory
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12307
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gc.c b/gc.c
index 2ff8bc98de..774f82bb5b 100644
--- a/gc.c
+++ b/gc.c
@@ -4446,6 +4446,13 @@ rb_memerror(void)
EC_JUMP_TAG(ec, TAG_RAISE);
}
+bool
+rb_memerror_reentered(void)
+{
+ rb_execution_context_t *ec = GET_EC();
+ return (ec && rb_ec_raised_p(ec, RAISED_NOMEMORY));
+}
+
void
rb_malloc_info_show_results(void)
{