From 65f831d17c84900c1faea49164688e2f5ce59563 Mon Sep 17 00:00:00 2001 From: Monty Date: Sun, 28 Jun 2020 20:07:32 +0300 Subject: Fixed bugs found by valgrind - Some of the bug fixes are backports from 10.5! - The fix in innobase/fil/fil0fil.cc is just a backport to get less error messages in mysqld.1.err when running with valgrind. - Renamed HAVE_valgrind_or_MSAN to HAVE_valgrind --- include/my_sys.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/my_sys.h') diff --git a/include/my_sys.h b/include/my_sys.h index 61551d38337..60f5613eec1 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -535,6 +535,7 @@ static inline int my_b_read(IO_CACHE *info, uchar *Buffer, size_t Count) static inline int my_b_write(IO_CACHE *info, const uchar *Buffer, size_t Count) { + MEM_CHECK_DEFINED(Buffer, Count); if (info->write_pos + Count <= info->write_end) { memcpy(info->write_pos, Buffer, Count); @@ -556,6 +557,7 @@ static inline int my_b_get(IO_CACHE *info) static inline my_bool my_b_write_byte(IO_CACHE *info, uchar chr) { + MEM_CHECK_DEFINED(&chr, 1); if (info->write_pos >= info->write_end) if (my_b_flush_io_cache(info, 1)) return 1; -- cgit v1.2.1