Commit 02a60e86 authored by Marko Mäkelä's avatar Marko Mäkelä

Silence some more bogus Valgrind warnings on non-32-bit systems. (Bug #53307)

parent 05339fe6
...@@ -495,7 +495,12 @@ success: ...@@ -495,7 +495,12 @@ success:
mutex_exit(mutex); mutex_exit(mutex);
} else if (i == buf_buddy_get_slot(sizeof(buf_page_t))) { } else if (i == buf_buddy_get_slot(sizeof(buf_page_t))) {
/* This must be a buf_page_t object. */ /* This must be a buf_page_t object. */
#if UNIV_WORD_SIZE == 4
/* On 32-bit systems, there is no padding in
buf_page_t. On other systems, Valgrind could complain
about uninitialized pad bytes. */
UNIV_MEM_ASSERT_RW(src, size); UNIV_MEM_ASSERT_RW(src, size);
#endif
if (buf_buddy_relocate_block(src, dst)) { if (buf_buddy_relocate_block(src, dst)) {
goto success; goto success;
......
...@@ -2280,7 +2280,12 @@ wait_until_unfixed: ...@@ -2280,7 +2280,12 @@ wait_until_unfixed:
ut_ad(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE); ut_ad(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE);
mutex_enter(&block->mutex); mutex_enter(&block->mutex);
#if UNIV_WORD_SIZE == 4
/* On 32-bit systems, there is no padding in buf_page_t. On
other systems, Valgrind could complain about uninitialized pad
bytes. */
UNIV_MEM_ASSERT_RW(&block->page, sizeof block->page); UNIV_MEM_ASSERT_RW(&block->page, sizeof block->page);
#endif
buf_block_buf_fix_inc(block, file, line); buf_block_buf_fix_inc(block, file, line);
......
...@@ -1494,8 +1494,13 @@ alloc: ...@@ -1494,8 +1494,13 @@ alloc:
ut_ad(prev_b->in_LRU_list); ut_ad(prev_b->in_LRU_list);
ut_ad(buf_page_in_file(prev_b)); ut_ad(buf_page_in_file(prev_b));
#if UNIV_WORD_SIZE == 4
/* On 32-bit systems, there is no
padding in buf_page_t. On other
systems, Valgrind could complain about
uninitialized pad bytes. */
UNIV_MEM_ASSERT_RW(prev_b, sizeof *prev_b); UNIV_MEM_ASSERT_RW(prev_b, sizeof *prev_b);
#endif
UT_LIST_INSERT_AFTER(LRU, buf_pool->LRU, UT_LIST_INSERT_AFTER(LRU, buf_pool->LRU,
prev_b, b); prev_b, b);
......
...@@ -3117,8 +3117,13 @@ page_zip_validate_low( ...@@ -3117,8 +3117,13 @@ page_zip_validate_low(
temp_page_zip in a debugger when running valgrind --db-attach. */ temp_page_zip in a debugger when running valgrind --db-attach. */
VALGRIND_GET_VBITS(page, temp_page, UNIV_PAGE_SIZE); VALGRIND_GET_VBITS(page, temp_page, UNIV_PAGE_SIZE);
UNIV_MEM_ASSERT_RW(page, UNIV_PAGE_SIZE); UNIV_MEM_ASSERT_RW(page, UNIV_PAGE_SIZE);
# if UNIV_WORD_SIZE == 4
VALGRIND_GET_VBITS(page_zip, &temp_page_zip, sizeof temp_page_zip); VALGRIND_GET_VBITS(page_zip, &temp_page_zip, sizeof temp_page_zip);
/* On 32-bit systems, there is no padding in page_zip_des_t.
On other systems, Valgrind could complain about uninitialized
pad bytes. */
UNIV_MEM_ASSERT_RW(page_zip, sizeof *page_zip); UNIV_MEM_ASSERT_RW(page_zip, sizeof *page_zip);
# endif
VALGRIND_GET_VBITS(page_zip->data, temp_page, VALGRIND_GET_VBITS(page_zip->data, temp_page,
page_zip_get_size(page_zip)); page_zip_get_size(page_zip));
UNIV_MEM_ASSERT_RW(page_zip->data, page_zip_get_size(page_zip)); UNIV_MEM_ASSERT_RW(page_zip->data, page_zip_get_size(page_zip));
......
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