dovecot-1.1: DEBUG: Use t_buffer_alloc_last_full() before callin...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Mar 3 07:20:42 EET 2008
details: http://hg.dovecot.org/dovecot-1.1/rev/a1b8a12521a0
changeset: 7327:a1b8a12521a0
user: Timo Sirainen <tss at iki.fi>
date: Mon Mar 03 07:20:38 2008 +0200
description:
DEBUG: Use t_buffer_alloc_last_full() before calling i_warning() to make
sure we don't trash unallocated data from data stack.
diffstat:
1 file changed, 4 insertions(+)
src/lib/mempool-alloconly.c | 4 ++++
diffs (14 lines):
diff -r 5017c74367e3 -r a1b8a12521a0 src/lib/mempool-alloconly.c
--- a/src/lib/mempool-alloconly.c Mon Mar 03 07:19:30 2008 +0200
+++ b/src/lib/mempool-alloconly.c Mon Mar 03 07:20:38 2008 +0200
@@ -210,6 +210,10 @@ static void block_alloc(struct alloconly
size = nearest_power(size);
#ifdef DEBUG
if (!apool->disable_warning) {
+ /* i_warning() overwrites unallocated data in data
+ stack, so make sure everything is allocated before
+ calling it. */
+ t_buffer_alloc_last_full();
i_warning("Growing pool '%s' with: %"PRIuSIZE_T,
apool->name, size);
}
More information about the dovecot-cvs
mailing list