Skip to content

Conversation

grooverdan
Copy link
Member

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

Description

Clang static analysis tools like Infer, are written around static analysis and not undefined behaviour detection at runtime.

They have no -fsanitize=undefined implemented.

We'd like them to follow the path #define UNINIT_VAR(x) x which
is what our release binaries use. This is the only sane path for analysis
that will detect uninitalization in various forms.

Clang based compilers with error during compilation if any
uninitialized behaviour is detected at compile time because of
0c80ddb.

Corrects MDEV-36542 - 6fd57f4.

Release Notes

nothing - clang not used as part of release.

How can this PR be tested?

Attempt to use infer to staticly analyse.

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.

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.

…IT_VAR

Clang static analysis tools like Infer, are written around
static analysis and not undefined behaviour detection at runtime.

They have no -fsanitize=undefined implemented.

We'd like them to follow the path #define UNINIT_VAR(x) x which
is what our release binaries use. This is the only sane path for analysis
that will detect uninitalization in various forms.

Clang based compilers with error during compilation if any
uninitialized behaviour is detected at compile time because of
0c80ddb.

Corrects MDEV-36542 - 6fd57f4.
@grooverdan grooverdan requested a review from montywi September 10, 2025 06:10
@grooverdan grooverdan added the MariaDB Foundation Pull requests created by MariaDB Foundation label Sep 10, 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