SWDEV-439234 - Access check before memcpy and kernel operations.
Change-Id: I7057125c03460db205409e19980145298c190fe2
Bu işleme şunda yer alıyor:
1 ebeveyn
bb03ef11a3
işleme
6211037f63
9 files changed
+110
-34
No files matched your search
@@ -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));
|
||||
|
||||
Reference in new issue
Bir kullanıcı engelle