Add MSan and integrate it with CI#13916
Merged
minchopaskal merged 9 commits intoredis:unstablefrom May 9, 2025
Merged
Conversation
sundb
reviewed
Apr 2, 2025
Collaborator
|
Note: Msan is complementary to Asan. Asan has bunch of memory safety checks but it does not check use of uninitialized data. M san is doing that check. |
fix no_sanitize macro definitions add error msg for msan when not compiled with clang
sundb
reviewed
Apr 7, 2025
tezc
reviewed
Apr 7, 2025
tezc
reviewed
Apr 7, 2025
tezc
reviewed
Apr 7, 2025
tezc
reviewed
Apr 7, 2025
tezc
approved these changes
May 7, 2025
sundb
reviewed
May 7, 2025
sundb
reviewed
May 7, 2025
Collaborator
sundb
approved these changes
May 8, 2025
minchopaskal
added a commit
that referenced
this pull request
May 13, 2025
PR #13916 introduced a regression - by overriding the `CFLAGS` and `LDFLAGS` variables for all of the dependencies hiredis and fast_float lost some of their compiler/linker flags. This PR makes it so we can pass additional CFLAGS/LDFLAGS to hiredis, without overriding them as it contains a bit more complex Makefile. As for fast_float - passing CFLAGS/LDFLAGS from outside now doesn't break the expected behavior. The build step in the CI was changed so that the MacOS is now build with TLS to catch such errors in the future.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Memory sanitizer (MSAN) is used to detect use-of-uninitialized memory issues. While Address Sanitizer catches a wide range of memory safety issues, it doesn't specifically detect uninitialized memory usage. Therefore, Memory Sanitizer complements Address Sanitizer. This PR adds MSAN run to the daily build, with the possibility of incorporating it into the ci.yml workflow in the future if needed.
Changes in source files fix false-positive issues and they should not introduce any runtime implications.
Note: Valgrind performs similar checks to both ASAN and MSAN but sanitizers run significantly faster.
Limitations