Skip to content

Commit

Permalink
[Bug #20941] Bail out when recursing no memory
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Dec 11, 2024
1 parent 80038b9 commit 6005b39
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gc/default/default.c
Original file line number Diff line number Diff line change
Expand Up @@ -2470,6 +2470,8 @@ newobj_slowpath(VALUE klass, VALUE flags, rb_objspace_t *objspace, rb_ractor_new
if (during_gc) {
dont_gc_on();
during_gc = 0;
rb_execution_context_t *ec = GET_EC();
if (ec && rb_ec_raised_p(ec, RAISED_NOMEMORY)) rb_memerror();
rb_bug("object allocation during garbage collection phase");
}

Expand Down

0 comments on commit 6005b39

Please sign in to comment.