mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 15:53:45 +08:00
test: cleanup usm reuse before release device res
Normally usm reuse is cleaned up before releasing device resources. This cleanup accesses neo device. Calling it after device resources release causes use after free. Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
e652679b95
commit
c925353d86
@@ -4458,6 +4458,7 @@ TEST_F(DeviceTest, givenValidDeviceWhenCallingReleaseResourcesThenDirectSubmissi
|
||||
auto deviceImp = static_cast<DeviceImp *>(device);
|
||||
EXPECT_FALSE(neoDevice->stopDirectSubmissionCalled);
|
||||
neoDevice->incRefInternal();
|
||||
driverHandle->getSvmAllocsManager()->cleanupUSMAllocCaches();
|
||||
deviceImp->releaseResources();
|
||||
EXPECT_TRUE(neoDevice->stopDirectSubmissionCalled);
|
||||
neoDevice->decRefInternal();
|
||||
|
||||
Reference in New Issue
Block a user