Fail gracefully if memory allocation did not succeed
Testing: precheckin (http://ocltc.amd.com:8111/viewModification.html?modId=69427&personal=true&tab=vcsModificationBuilds) [git-p4: depot-paths = "//depot/stg/hsa/drivers/hsa/runtime/": change = 1256179]
이 커밋은 다음에 포함됨:
@@ -472,7 +472,10 @@ void* LoaderContext::SegmentAlloc(amdgpu_hsa_elf_segment_t segment,
|
||||
if (nullptr == mem) {
|
||||
return nullptr;
|
||||
}
|
||||
mem->Allocate(size, align, zero);
|
||||
if (!mem->Allocate(size, align, zero)) {
|
||||
delete mem;
|
||||
return nullptr;
|
||||
}
|
||||
return mem;
|
||||
}
|
||||
|
||||
|
||||
새 이슈에서 참조
사용자 차단