Commit 10b06978 authored by Marko Mäkelä's avatar Marko Mäkelä

Suppress bogus Valgrind warnings about buf_buddy_relocate()

accessing uninitialized memory in Valgrind-instrumented builds.
parent 1a892fa2
...@@ -722,3 +722,8 @@ ...@@ -722,3 +722,8 @@
fun:pthread_create* fun:pthread_create*
} }
{
buf_buddy_relocate peeking (space,page) in potentially free blocks
Memcheck:Addr1
fun:buf_buddy_relocate
}
...@@ -442,11 +442,15 @@ buf_buddy_relocate( ...@@ -442,11 +442,15 @@ buf_buddy_relocate(
pool), so there is nothing wrong about this. The pool), so there is nothing wrong about this. The
mach_read_from_4() calls here will only trigger bogus mach_read_from_4() calls here will only trigger bogus
Valgrind memcheck warnings in UNIV_DEBUG_VALGRIND builds. */ Valgrind memcheck warnings in UNIV_DEBUG_VALGRIND builds. */
bpage = buf_page_hash_get( ulint space = mach_read_from_4(
mach_read_from_4((const byte*) src (const byte*) src + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
+ FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID), ulint page_no = mach_read_from_4(
mach_read_from_4((const byte*) src (const byte*) src + FIL_PAGE_OFFSET);
+ FIL_PAGE_OFFSET)); /* Suppress Valgrind warnings about conditional jump
on uninitialized value. */
UNIV_MEM_VALID(&space, sizeof space);
UNIV_MEM_VALID(&page_no, sizeof page_no);
bpage = buf_page_hash_get(space, page_no);
if (!bpage || bpage->zip.data != src) { if (!bpage || bpage->zip.data != src) {
/* The block has probably been freshly /* The block has probably been freshly
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment