Commit 4c2e9718 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-33052 MSAN use-of-uninitialized-value in buf_read_ahead_linear()

buf_read_ahead_linear(): Suppress a warning of comparing potentially
uninitialized FIL_PAGE_PREV and FIL_PAGE_NEXT fields.
parent 4ae105a3
......@@ -643,6 +643,12 @@ buf_read_ahead_linear(const page_id_t page_id, ulint zip_size, bool ibuf)
uint32_t prev= mach_read_from_4(my_assume_aligned<4>(f + FIL_PAGE_PREV));
uint32_t next= mach_read_from_4(my_assume_aligned<4>(f + FIL_PAGE_NEXT));
/* The underlying file page of this buffer pool page could actually
be marked as freed, or a read of the page into the buffer pool might
be in progress. We may read uninitialized data here.
Suppress warnings of comparing uninitialized values. */
MEM_MAKE_DEFINED(&prev, sizeof prev);
MEM_MAKE_DEFINED(&next, sizeof next);
if (prev == FIL_NULL || next == FIL_NULL)
goto hard_fail;
page_id_t id= page_id;
......
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