-
Notifications
You must be signed in to change notification settings - Fork 8k
Fix AArch64 MSan warnings #15838
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
base: PHP-8.2
Are you sure you want to change the base?
Fix AArch64 MSan warnings #15838
Conversation
Yeah, all of these are false positives. I don't think we should use |
95dbfa6
to
9ba581c
Compare
Indeed, replaced |
@iluuu1994 |
result = zend_string_safe_alloc(((length + 2) / 3), 4 * sizeof(char), 0, 0); | ||
|
||
# if __has_feature(memory_sanitizer) | ||
/* Clang 18 MSan does not instrument on AArch64. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is not accurate. Instrumentation does happen, just not correctly. I believe it's some intrinsic calls in neon_base64_encode
/neon_base64_decode
that actually lack instrumentation. So, you should likely move these unpoisons there. It might also be nice to move the __msan_unpoison
to zend_portability.h with a conditional macro so that we can avoid the constant #include
and __has_feature(memory_sanitizer)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, will try to move to zend_portability.h
# if __has_feature(memory_sanitizer) | ||
/* Clang 18 MSan does not instrument on AArch64. */ | ||
__msan_unpoison(ZSTR_VAL(result), ZSTR_LEN(result)); | ||
# endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
Clang 18 (stable) on AArch64 generates warnings about uninitialized values when using MSan.
This PR fixes the issue, but it's likely a false positive.
I'm not yet sure how to properly address the false positive, but I'm creating this draft PR for now.