server icon indicating copy to clipboard operation
server copied to clipboard

MDEV-36482: Make aio work WITH_MSAN=ON

Open dr-m opened this issue 7 months ago • 1 comments
trafficstars

  • [x] The Jira issue number for this PR is: MDEV-36482

Description

As noted in c36834c8324974f26770d64192898f4f45d9f772 the MemorySanitizer instrumented builds so far only work with the synchronous I/O interface (innodb_use_native_aio=OFF).

It is not that hard to make asynchronous I/O work with libaio, without even instrumenting that library.

buf_page_t::read_complete(): When using asynchronous I/O, declare the page as initialized.

aio_linux::getevent_thread_routine(): Declare the buffer that is returned by my_getevents() as initialized.

FIXME: How to make liburing work? Is it feasible to compile an instrumented version of it?

Release Notes

N/A

How can this PR be tested?

cmake -DWITH_MSAN=ON -DCMAKE_DISABLE_FIND_PACKAGE_URING=1 …

and run the test suite. Keep in mind that io_setup(2) of libaio will fail on tmpfs.

Basing the PR against the correct MariaDB version

  • [ ] This is a new feature or a refactoring, and the PR is based against the main branch.
  • [x] This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.

PR quality check

  • [x] I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • [x] For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

dr-m avatar Apr 04 '25 07:04 dr-m