SWDEV-299491 - Update data index in GetSvmAttributes appropriately

Fixes Seg fault caused when the attribute hipMemRangeAttributeAccessedBy
is queried using hipMemRangeGetAttribute

Change-Id: I2ceb2267d89bfc31a55d9eae2685610c7ad89b1f


[ROCm/clr commit: 48c1b895c0]
Этот коммит содержится в:
Satyanvesh Dittakavi
2021-08-19 14:59:11 +00:00
родитель 7ef84276d2
Коммит 9805fb774e
+2 -2
Просмотреть файл
@@ -2477,8 +2477,8 @@ bool Device::GetSvmAttributes(void** data, size_t* data_sizes, int* attributes,
}
}
rocr_attr += accessed_by;
for (uint32_t idx = entry; idx < device_count; ++idx) {
reinterpret_cast<int32_t*>(data[idx])[idx] =
for (uint32_t i = entry; i < device_count; ++i) {
reinterpret_cast<int32_t*>(data[idx])[i] =
static_cast<int32_t>(amd::InvalidDeviceId);
}
break;