From: Martti Rannanjärvi Date: Sat, 23 Jul 2016 20:58:46 +0000 (+0300) Subject: lib,lib-test: i_warning to i_debug on alloc growing messages X-Git-Tag: 2.3.0.rc1~3283 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9745f03bbaaa3d15043d231b84128beecf97dd93;p=thirdparty%2Fdovecot%2Fcore.git lib,lib-test: i_warning to i_debug on alloc growing messages --- diff --git a/src/lib-test/test-common.c b/src/lib-test/test-common.c index 270e0effff..948e9b6af0 100644 --- a/src/lib-test/test-common.c +++ b/src/lib-test/test-common.c @@ -294,14 +294,6 @@ test_error_handler(const struct failure_context *ctx, { test_dump_rand_state(); default_error_handler(ctx, format, args); -#ifdef DEBUG - if (ctx->type == LOG_TYPE_WARNING && - strstr(format, "Growing") != NULL) { - /* ignore "Growing memory pool" and "Growing data stack" - warnings */ - return; - } -#endif if (expected_errors > 0) { if (expected_error_str != NULL) { test_assert(strstr(format, expected_error_str) != NULL); diff --git a/src/lib/data-stack.c b/src/lib/data-stack.c index c9ee52dea6..342932df26 100644 --- a/src/lib/data-stack.c +++ b/src/lib/data-stack.c @@ -413,9 +413,9 @@ static void *t_malloc_real(size_t size, bool permanent) #ifdef DEBUG if (warn && getenv("DEBUG_SILENT") == NULL) { - /* warn after allocation, so if i_warning() wants to + /* warn after allocation, so if i_debug() wants to allocate more memory we don't go to infinite loop */ - i_warning("Growing data stack by %"PRIuSIZE_T" as " + i_debug("Growing data stack by %"PRIuSIZE_T" as " "'%s' reaches %llu bytes from %u allocations.", current_block->size, current_frame_block->marker[frame_pos], diff --git a/src/lib/mempool-alloconly.c b/src/lib/mempool-alloconly.c index 3925438c69..4af14b8596 100644 --- a/src/lib/mempool-alloconly.c +++ b/src/lib/mempool-alloconly.c @@ -222,11 +222,11 @@ static void block_alloc(struct alloconly_pool *apool, size_t size) size = nearest_power(size); #ifdef DEBUG if (!apool->disable_warning) { - /* i_warning() overwrites unallocated data in data + /* i_debug() 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, + i_debug("Growing pool '%s' with: %"PRIuSIZE_T, apool->name, size); } #endif