summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-07-04 22:11:16 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-07-04 22:11:16 +0300
commitb99fa1e7674fce2943a1f03a742249cf9aa4162b (patch)
tree3447cece45410d3dffb6969eecbb58ef43ee0b8a
parente9f06b19e09319d11c346943871254aaf755af24 (diff)
parent453dc4b300e0d595adb736fb555e62a42accfa2b (diff)
downloadmariadb-git-b99fa1e7674fce2943a1f03a742249cf9aa4162b.tar.gz
Merge 10.3 into 10.4
-rw-r--r--storage/innobase/buf/buf0buf.cc19
1 files changed, 16 insertions, 3 deletions
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
index f95ef7480dd..3bdc6f3eecf 100644
--- a/storage/innobase/buf/buf0buf.cc
+++ b/storage/innobase/buf/buf0buf.cc
@@ -1622,7 +1622,7 @@ buf_chunk_init(
return(NULL);
}
- MEM_MAKE_ADDRESSABLE(chunk->mem, chunk->mem_size());
+ MEM_MAKE_ADDRESSABLE(chunk->mem, chunk->mem_size());
#ifdef HAVE_LIBNUMA
if (srv_numa_interleave) {
@@ -2890,8 +2890,21 @@ withdraw_retry:
while (chunk < echunk) {
buf_block_t* block = chunk->blocks;
- MEM_MAKE_ADDRESSABLE(chunk->mem,
- chunk->mem_size());
+ /* buf_LRU_block_free_non_file_page()
+ invokes MEM_NOACCESS() on any blocks
+ that are in free_list. We must
+ cancel the effect of that. In MemorySanitizer,
+ MEM_NOACCESS() is no-op, so we must not do
+ anything special for it here. */
+#ifdef HAVE_valgrind
+# if !__has_feature(memory_sanitizer)
+ MEM_MAKE_DEFINED(chunk->mem,
+ chunk->mem_size());
+# endif
+#else
+ MEM_MAKE_ADDRESSABLE(chunk->mem,
+ chunk->mem_size());
+#endif
for (ulint j = chunk->size;
j--; block++) {