SWDEV-526188 - Fix race condition in StatCO::getStatFunc()

Make sure that a newly created FatBinaryInfo is assigned to modules only after extractFatBinary has been called for the object.

[ROCm/clr commit: 1099e0a131]
Этот коммит содержится в:
Assiouras, Ioannis
2025-04-27 21:14:01 +01:00
коммит произвёл GitHub
родитель cd14def193
Коммит 875468bbfb
+4 -4
Просмотреть файл
@@ -1312,10 +1312,10 @@ hipError_t StatCO::digestFatBinary(const void* data, FatBinaryInfo*& programs) {
}
// Create a new fat binary object and extract the fat binary for all devices.
programs = new FatBinaryInfo(nullptr, data);
IHIP_RETURN_ONFAIL(programs->ExtractFatBinary(g_devices));
return hipSuccess;
FatBinaryInfo* fatBinaryInfo = new FatBinaryInfo(nullptr, data);
hipError_t err = fatBinaryInfo->ExtractFatBinary(g_devices);
programs = fatBinaryInfo;
return err;
}
FatBinaryInfo** StatCO::addFatBinary(const void* data, bool initialized, bool& success) {