Skip to content

Commit

Permalink
After-merge fix
Browse files Browse the repository at this point in the history
mysqld_exit(): Change the assertion failure on
global_status_var.global_memory_used == 0
to fprintf, like in 0bcb65d

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 88cf6f1
with the MDEV-22348 test case (Aria startup failure when running
main.default_storage_engine).
  • Loading branch information
dr-m committed Apr 23, 2020
1 parent 455cf61 commit 61c0df9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sql/mysqld.cc
Expand Up @@ -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;
Expand Down

0 comments on commit 61c0df9

Please sign in to comment.