Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix uninitialised vars in memory-pool setup in offload runtime
This patch fixes a bug in the AMDGPU offload plugin during initialisation of memory pools. The function preAllocateDeviceMemoryPool is called (only) from a location where memory pool metadata structures have already been enumerated and initialised (in initImpl, by calling initMemoryPools). But it then calls retrieveMemoryPools *again*, but does not go on to initialise the newly-created duplicate metadata properly before using it, meaning some fields (Segment, GlobalFlags) are left with uninitialised data. That can lead to unpredictable behaviour. The fix is just to remove the "retrieval", i.e. allocation, of duplicate pool metadata. Change-Id: I7cd7e46c0f2c655a8007299595c553f33451ccb1
- Loading branch information