SWDEV-374373 - Occupied size should be within range.
Change-Id: I20e24c628c51154c2f8f36dca0a6fa4ead1ee6d0
[ROCm/clr commit: 67792dd858]
This commit is contained in:
committed by
Jaydeepkumar Patel
parent
7f56e0e09c
commit
f6a5cd9e33
@@ -2760,6 +2760,14 @@ hipError_t ihipGraphMemsetParams_validate(const hipMemsetParams* pNodeParams) {
|
||||
if (pNodeParams->height <= 0) {
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
|
||||
amd::Memory *memObj = amd::MemObjMap::FindMemObj(pNodeParams->dst);
|
||||
if (memObj != nullptr) {
|
||||
if ((pNodeParams->pitch * pNodeParams->height) > memObj->getSize()) {
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
}
|
||||
|
||||
return hipSuccess;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user