diff --git a/lib/Common/Memory/Recycler.inl b/lib/Common/Memory/Recycler.inl index df4dbf2300e..d2cb65bb722 100644 --- a/lib/Common/Memory/Recycler.inl +++ b/lib/Common/Memory/Recycler.inl @@ -617,8 +617,8 @@ SmallHeapBlockT::GetRealAddressFromInterior(void * interiorAdd const ValidPointers validPointers = HeapInfo::GetValidPointersMapForBucket(bucketIndex); size_t rawInteriorAddress = reinterpret_cast(interiorAddress); size_t baseAddress = rawInteriorAddress & ~(TBlockAttributes::PageCount * AutoSystemInfo::PageSize - 1); - ushort offset = (ushort)(rawInteriorAddress - baseAddress); - offset = validPointers.GetInteriorAddressIndex(offset >> HeapConstants::ObjectAllocationShift); + uint byteOffset = (uint)(rawInteriorAddress - baseAddress); + ushort offset = validPointers.GetInteriorAddressIndex(byteOffset >> HeapConstants::ObjectAllocationShift); if (offset == SmallHeapBlockT::InvalidAddressBit) {