diff options
author | Nobuyoshi Nakada <[email protected]> | 2024-12-11 16:12:04 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2024-12-11 16:12:04 +0900 |
commit | f243733564940401d914686837b701bc31311248 (patch) | |
tree | 8623ca7908e6a3fd31e5edbb5f4af8432a5a8c00 /gc.c | |
parent | c2a5d4cdc0e7f5e8b0937f4b395e2f062472d6e7 (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.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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) { |