-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Fix use of uninitialized memory for Vector3 constants #74857
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue Detailsnull
|
I wonder if it should always be zero in the first place, it looks like that field is not zero-initialized when runtime/src/coreclr/jit/gentree.h Lines 3510 to 3511 in 51f3ca6
and e.g. here it gets a garbage value in the 4th element: runtime/src/coreclr/jit/assertionprop.cpp Lines 3186 to 3187 in 51f3ca6
|
It is technically UB to access the inactive union member there, so I think the code should rather be changed to access |
I am not following. The line that you have highlighted is initializing |
Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
This should get the same fix: runtime/src/coreclr/jit/instr.cpp Lines 765 to 770 in 9e8d261
|
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/2965504715 |
@jkotas That's the point - it doesn't initialize |
Right. The type of the tree is I think it would be unnatural to require that the top 4 bytes of gtSimd16Val field have to be initialized for |
Found while investigating #72149.
In a good case, it made the size and content of readonly data non-deterministic.
In a bad case, it exposed downstream bugs like #72149 intermittently.