Skip to content

MDEV-37048 revert MSAN my_vsnprintf_ex for double workaround #4129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 10.6
Choose a base branch
from

Conversation

grooverdan
Copy link
Member

  • The Jira issue number for this PR is: MDEV-37048

Description

5 years ago e843033 worked around a MSAN bug when retrieving a double from a va_list.

The construct {{__msan_check_mem_is_initialized(ap,size)}} where ap is a va_list is undefined as {{__msan_check_mem_is_initialized}} expects a pointer. The implementation detail of va_list is architecture dependant and on aarch64 this isn't a pointer.

The need to do any msan action is no unnecessary since this has been corrected in recent clang versions.

As such the additions from e843033 have been reverted.

Tested with clang-20.1 and the test cases from MDEV-22690 and MDEV-22691.

Release Notes

not user visible change

How can this PR be tested?

msan builder on arm64 (MariaDB/buildbot#769)

main.opt_trace_ucs2                      w5 [ pass ]    153
main.opt_trace_security                  w4 [ pass ]    720
maria.maria-recovery2                    w6 [ pass ]   8533
main.opt_trace_index_merge_innodb        w3 [ pass ]   9618
main.opt_trace_index_merge               w2 [ pass ]  21641
main.opt_trace                           w1 [ pass ]  26391
--------------------------------------------------------------------------
The servers were restarted 0 times
Spent 67.056 of 43 seconds executing testcases

Completed: All 6 tests were successful.

buildbot@83789079768a:/build$ uname -a ; sql/mariadbd --version
Linux 83789079768a 6.1.0-28-arm64 #1 SMP Debian 6.1.119-1 (2024-11-22) aarch64 GNU/Linux
sql/mariadbd  Ver 11.4.8-MariaDB-debug for Linux on aarch64 (Source distribution)

TODO: modify the automated test suite to verify that the PR causes MariaDB to behave as intended.
Consult the documentation on "Writing good test cases".

If the changes are not amenable to automated testing, please explain why not and carefully describe how to test manually.

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.
  • This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.
  • This is a enabling change to deploy a MSAN Debug builder in BB

PR quality check

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

5 years ago e843033 worked around a
MSAN bug when retrieving a double from a va_list.

The construct {{__msan_check_mem_is_initialized(ap,size)}} where ap
is a va_list is undefined as {{__msan_check_mem_is_initialized}}
expects a pointer. The implementation detail of va_list is architecture
dependant and on aarch64 this isn't a pointer.

The need to any msan action is no unnecessary since this has been
corrected in recent clang versions.

As such the additions from e843033
have been reverted.

Tested with clang-20.1 and the test cases from MDEV-22690 and
MDEV-22691.
@grooverdan grooverdan requested a review from dr-m June 20, 2025 01:08
@grooverdan grooverdan added the MariaDB Foundation Pull requests created by MariaDB Foundation label Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MariaDB Foundation Pull requests created by MariaDB Foundation
Development

Successfully merging this pull request may close these issues.

1 participant