dovecot: If data stack growing fails because of out-of-memory, s...

dovecot at dovecot.org dovecot at dovecot.org
Thu Sep 20 17:05:24 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/e10e2147d994
changeset: 6440:e10e2147d994
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Sep 20 17:05:19 2007 +0300
description:
If data stack growing fails because of out-of-memory, something's probably
buggy so do assert() to dump core.

diffstat:

1 file changed, 2 insertions(+), 3 deletions(-)
src/lib/data-stack.c |    5 ++---

diffs (15 lines):

diff -r b951f3e42322 -r e10e2147d994 src/lib/data-stack.c
--- a/src/lib/data-stack.c	Tue Sep 18 18:14:29 2007 +0300
+++ b/src/lib/data-stack.c	Thu Sep 20 17:05:19 2007 +0300
@@ -200,9 +200,8 @@ static struct stack_block *mem_block_all
 	block = GC_malloc(SIZEOF_MEMBLOCK + alloc_size);
 #endif
 	if (block == NULL) {
-		i_fatal_status(FATAL_OUTOFMEM, "mem_block_alloc(): "
-			       "Out of memory when allocating %"PRIuSIZE_T
-			       " bytes", alloc_size + SIZEOF_MEMBLOCK);
+		i_panic("data stack: Out of memory when allocating %"
+			PRIuSIZE_T" bytes", alloc_size + SIZEOF_MEMBLOCK);
 	}
 	block->size = alloc_size;
 	block->next = NULL;


More information about the dovecot-cvs mailing list