From d4c09187659211eb902e57fc8a9cda2d9df20d07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Fri, 6 Mar 2026 10:52:24 +0200 Subject: [PATCH] MDEV-38958: Core dump contains buffer pool in release builds buf_pool_t::create(), buf_pool_t::resize(): After my_virtual_mem_commit() successfully invoked mmap(MAP_FIXED), invoke ut_dontdump() so that the buffer pool will continue to be excluded from any core dump as expected on platforms that implement this functionality. This was manually tested on Linux and FreeBSD by executing killall -ABRT mariadbd and checking the size of the core dump file, while the following test case was executing: --source include/have_innodb.inc set global innodb_buffer_pool_size=10737418240; sleep 3600; This fixes up the following changes: commit b6923420f326ac030e4f3ef89a2acddb45eccb30 (MDEV-29445) commit 072c7dc774e7f31974eaa43ec1cbb3b742a1582e (MDEV-38671) --- storage/innobase/buf/buf0buf.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index 189a506c3a37e..bc28a86d74aa9 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -1359,7 +1359,6 @@ bool buf_pool_t::create() noexcept } MEM_UNDEFINED(memory_unaligned, size); - ut_dontdump(memory_unaligned, size, true); memory= memory_unaligned + alignment_waste; size_unaligned= size; size-= alignment_waste; @@ -1382,6 +1381,7 @@ bool buf_pool_t::create() noexcept memory_unaligned= nullptr; goto oom; } + ut_dontdump(memory_unaligned, size, true); #else update_malloc_size(actual_size, 0); #endif @@ -1938,6 +1938,7 @@ ATTRIBUTE_COLD void buf_pool_t::resize(size_t size, THD *thd) noexcept return; } + ut_dontdump(memory_unaligned, size, true); size_in_bytes_requested= size; size_in_bytes= size;