Mercurial > dovecot > original-hg > dovecot-1.2
changeset 7327:a1b8a12521a0 HEAD
DEBUG: Use t_buffer_alloc_last_full() before calling i_warning() to make
sure we don't trash unallocated data from data stack.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 03 Mar 2008 07:20:38 +0200 |
parents | 5017c74367e3 |
children | e0e212e7deeb |
files | src/lib/mempool-alloconly.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ 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); }