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.
Tá an tiomantas seo le fáil i:
Assiouras, Ioannis
2025-04-27 21:14:01 +01:00
tiomanta ag GitHub
tuismitheoir 072fb0804e
tiomantas 1099e0a131
+4 -4
Féach ar an gComhad
@@ -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) {