-
Notifications
You must be signed in to change notification settings - Fork 4.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
JIT: Ensure no overflow in ContainBlockStoreAddress #76532
Conversation
The offset here can be a "base" address due to various JIT transformations so we should ensure the range [offset, offset+size) does not overflow. Fix dotnet#76506
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsThe offset here can be a "base" address due to various JIT transformations so we should ensure the range [offset, offset+size) does not overflow. Fix #76506
|
Before #76273 we would see |
/azp run runtime-coreclr jitstress |
Azure Pipelines successfully started running 1 pipeline(s). |
cc: @tannergooding |
@@ -688,7 +688,12 @@ void Lowering::ContainBlockStoreAddress(GenTreeBlk* blkNode, unsigned size, GenT | |||
{ | |||
return; | |||
} | |||
#endif // TARGET_ARM | |||
#else // !TARGET_ARM | |||
if ((ClrSafeInt<int>(offset) + ClrSafeInt<int>(size)).IsOverflow()) |
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.
Can this overflow on arm too? Should this be outside the ifdef?
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.
I think the ARM specific check above is fine -- we only get here for unrolled block copies so size
is guaranteed to be small.
Some of the remaining failures may be related to the pending fix: #76517 |
The failure for Runtime_40607 is #76546 |
#76507 also still seems to be failing even with this fix. |
Bruce just opened #76550 for the remaining failure. |
The offset here can be a "base" address due to various JIT transformations so we should ensure the range [offset, offset+size) does not overflow.
Fix #76506