Commit 61c0df94 authored by Marko Mäkelä's avatar Marko Mäkelä

After-merge fix

mysqld_exit(): Change the assertion failure on
global_status_var.global_memory_used == 0
to fprintf, like in 0bcb65d3

It appears that in some cases, that variable may be nonzero
even when LeakSanitizer (WITH_ASAN) would not report errors.
This was observed in 10.4 88cf6f1c
with the MDEV-22348 test case (Aria startup failure when running
main.default_storage_engine).
parent 455cf619
......@@ -2191,10 +2191,10 @@ static void mysqld_exit(int exit_code)
set_malloc_size_cb(NULL);
if (global_status_var.global_memory_used)
{
#ifdef SAFEMALLOC
sf_report_leaked_memory(0);
#endif
DBUG_SLOW_ASSERT(global_status_var.global_memory_used == 0);
fprintf(stderr, "Warning: Memory not freed: %lld\n",
(longlong) global_status_var.global_memory_used);
if (exit_code == 0)
SAFEMALLOC_REPORT_MEMORY(0);
}
cleanup_tls();
DBUG_LEAVE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment