mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #3087 from kou/fix-segv-on-rerasing-no-memory-error
Fix SEGV on re-raising NoMemoryError
This commit is contained in:
@@ -215,6 +215,7 @@ mrb_realloc(mrb_state *mrb, void *p, size_t len)
|
||||
p2 = mrb_realloc_simple(mrb, p, len);
|
||||
if (!p2 && len) {
|
||||
if (mrb->gc.out_of_memory) {
|
||||
mrb_exc_raise(mrb, mrb_obj_value(mrb->nomem_err));
|
||||
/* mrb_panic(mrb); */
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user