• Marko Mäkelä's avatar
    MDEV-27058 fixup: Fix MemorySanitizer, and GCC 4.8.5 ICE on ARMv8 · 9436c778
    Marko Mäkelä authored
    buf_LRU_scan_and_free_block(): It turns out that even with
    -fno-expensive-optimizations, GCC 4.8.5 may fail to split an instruction.
    For the non-embedded server, -O1 would fail and -Og would seem to work,
    while the embedded server build seems to require -O0.
    
    buf_block_init(): Correct the MemorySanitizer instrumentation.
    
    buf_page_get_low(): Do not read dirty data from read-fixed blocks.
    These data races were identified by MemorySanitizer. If a read-fixed
    block is being accessed, we must acquire and release a page latch,
    so that the read-fix (and the exclusive page latch) will be released
    and it will be safe to read the page frame contents if needed,
    even before acquiring the final page latch. We do that in
    buf_read_ahead_linear() and for the allow_ibuf_merge check.
    
    mtr_t::page_lock(): Assert that the block is not read-fixed.
    9436c778
buf0lru.cc 42.7 KB