server icon indicating copy to clipboard operation
server copied to clipboard

WIP: MDEV-33755 Some test cause MSAN alarms due to uninitialized Item_func…

Open Olernov opened this issue 1 year ago • 0 comments
trafficstars

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

Description

Commit 09d991d01c47e22030879e5bf0c7a4893a598199 resolved false MSAN alarms by initializing Item_func::not_null_tables_cache with 0 during construction. However, this solution inadvertently disabled Valgrind diagnostics, which we want to retain to detect potential issues (e.g., failing to set not_null_tables_cache after calling Item_func::quick_fix_field()).

This commit introduces the macro MEM_UNDEFINED_VALGRIND_ONLY, enabling Valgrind diagnostic without triggering MSAN. Now, Item_func::not_null_tables_cache is marked as undefined during construction using this macro

Release Notes

TODO: What should the release notes say about this change? Include any changed system variables, status variables or behaviour. Optionally list any https://mariadb.com/kb/ pages that need changing.

How can this PR be tested?

No need for special test cases, it's enough that all tests with Valgrind diagnostic enabled pass

Basing the PR against the correct MariaDB version

  • [ ] This is a new feature or a refactoring, and the PR is based against the latest MariaDB development 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.

Olernov avatar Jul 25 '24 10:07 Olernov