SWDEV-439234 - Access check before memcpy and kernel operations.
Change-Id: I7057125c03460db205409e19980145298c190fe2
Tá an tiomantas seo le fáil i:
1 tuismitheoir
bb03ef11a3
tiomantas
6211037f63
9 comhad athraithe
+110
-34
Níor tháinig aon chomhaid le do chuardach
@@ -545,6 +545,14 @@ Device* Memory::GetDeviceById() {
|
||||
return getContext().devices()[device_idx];
|
||||
}
|
||||
|
||||
// =================================================================================================
|
||||
bool Memory::ValidateMemAccess(const Device& dev, bool read_write) {
|
||||
if (flags_ & CL_MEM_VA_RANGE_AMD) {
|
||||
return dev.ValidateMemAccess(*this, read_write);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void Buffer::initDeviceMemory() {
|
||||
deviceMemories_ = reinterpret_cast<DeviceMemory*>(reinterpret_cast<char*>(this) + sizeof(Buffer));
|
||||
memset(deviceMemories_, 0, NumDevicesWithP2P() * sizeof(DeviceMemory));
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir