diff options
author | Monty <monty@mariadb.org> | 2020-06-28 20:07:32 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2020-07-02 17:57:34 +0300 |
commit | 65f831d17c84900c1faea49164688e2f5ce59563 (patch) | |
tree | c7c576c77fbee59de6b2a1c7d8ac5041e0e06f8d /include/my_sys.h | |
parent | 29f9e679adc90adf5d3c6e08da947789c9c2ac8b (diff) | |
download | mariadb-git-65f831d17c84900c1faea49164688e2f5ce59563.tar.gz |
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
Diffstat (limited to 'include/my_sys.h')
-rw-r--r-- | include/my_sys.h | 2 |
1 files changed, 2 insertions, 0 deletions
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; |