summaryrefslogtreecommitdiffhomepage
path: root/src/gc.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2016-01-19 17:36:51 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2016-01-19 17:36:51 +0900
commit17bd40a566f5220c01fdb68e760e897d6d87c43a (patch)
treee410b5af1198dbed9ae7acd5741cd8af35e27abc /src/gc.c
parent70d24a9e5f501d3f237605f1c48a0ebb934a0ce9 (diff)
parent1d84b3205ae1b8bc5b8a269ffeb5a7f60e610ea6 (diff)
downloadmruby-17bd40a566f5220c01fdb68e760e897d6d87c43a.tar.gz
mruby-17bd40a566f5220c01fdb68e760e897d6d87c43a.zip
Merge pull request #3087 from kou/fix-segv-on-rerasing-no-memory-error
Fix SEGV on re-raising NoMemoryError
Diffstat (limited to 'src/gc.c')
-rw-r--r--src/gc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gc.c b/src/gc.c
index e31ec2f33..e892a6749 100644
--- a/src/gc.c
+++ b/src/gc.c
@@ -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 {