From 9d211e580c46ea755dd980a0e01045e90261ae09 Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 14 Jul 2006 17:12:47 +0000 Subject: * st.c (malloc): use xmalloc/xcalloc instead of plain malloc/calloc, to detect memory allocation failure. see . * gc.c (rb_memerror): should not raise empty nomem_error. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@10537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 2 +- gc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0feb6c94d..8ed697ff9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,7 +9,7 @@ Sat Jul 15 01:09:22 2006 Yukihiro Matsumoto malloc/calloc, to detect memory allocation failure. see . - * gc.c (rb_memerror): should not raise nomem_error. + * gc.c (rb_memerror): should not raise empty nomem_error. Fri Jul 14 13:08:13 2006 Hidetoshi NAGAI diff --git a/gc.c b/gc.c index c73da2c27..04f28e634 100644 --- a/gc.c +++ b/gc.c @@ -95,7 +95,7 @@ rb_memerror() { static int recurse = 0; - if (recurse > 0 && rb_safe_level() < 4) { + if (!nomem_error || (recurse > 0 && rb_safe_level() < 4)) { fprintf(stderr, "[FATAL] failed to allocate memory\n"); exit(1); } -- cgit