-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
MSAN reports false positives on interleaved storage on ARM AArch64 #72848
Comments
@llvm/issue-subscribers-backend-aarch64 Author: Vincent Rabaud (vrabaud)
On clang 18, the following test simply reports: "WARNING: MemorySanitizer: use-of-uninitialized-value".
It seems to be the case for different kinds of input. Even displaying the first element of the outputs fails.
```c++
#include <iostream>
#include <arm_neon.h>
TEST(Msan,interlace) {
int16x8x2_t vec2;
vec2.val[0] = vdupq_n_s16(1);
vec2.val[1] = vdupq_n_s16(2);
int16_t dst2[8*2];
vst2q_s16(dst2, vec2);
for(int16_t i: dst2) std::cout << (int)i << ",";
std::cout << std::endl;
uint8x16x3_t vec3;
|
We're seeing similar failures with vst3_lane_u8: https://godbolt.org/z/nWq8EYzTf Running that on an ARM device with MSAN triggers use-of-uninitialized-value |
First off, this clearly has nothing to do with the vararg support patch, as there are no varargs. I suspect that MSan is lacking the Neon intrinsics support.
gets compiled into the following IR:
|
CC @eugenis |
Godbolt link for posterity: https://godbolt.org/z/MMz3qvj69 |
This particular test case works with mainline LLVM as of last week: "[msan] Implement support for Arm NEON vst{2,3,4} instructions" (#99360) Currently, it only works for VST with integer operands (since it was a particularly common use case). There is followup work planned to implement support for VST with floating-point operands, non-interleaved vector store (VST1x{2,3,4}), and vector loads. |
For reference, here are the relevant patches that fixed the reported case (and more):
|
On clang 18, the following test simply reports: "WARNING: MemorySanitizer: use-of-uninitialized-value".
It seems to be the case for different kinds of input. Even displaying the first element of the outputs fails.
The text was updated successfully, but these errors were encountered: