mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 16:45:25 +08:00
Prevent nullptr dereference in aub dump subcapture mode
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
96fef37834
commit
5e201f40be
@@ -147,6 +147,25 @@ HWTEST_F(EnqueueHandlerWithAubSubCaptureTests, givenEnqueueHandlerWithAubSubCapt
|
||||
EXPECT_TRUE(cmdQ.waitUntilCompleteCalled);
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueHandlerWithAubSubCaptureTests, givenEnqueueMarkerWithAubSubCaptureWhenSubCaptureIsNotActiveThenEnqueueIsMadeBlocking) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.AUBDumpSubCaptureMode.set(1);
|
||||
|
||||
auto aubCsr = new MockAubCsr<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
||||
pDevice->resetCommandStreamReceiver(aubCsr);
|
||||
|
||||
AubSubCaptureCommon subCaptureCommon;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Filter;
|
||||
subCaptureCommon.subCaptureFilter.dumpKernelName = "invalid_kernel_name";
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("file_name.aub", subCaptureCommon);
|
||||
aubCsr->subCaptureManager.reset(subCaptureManagerMock);
|
||||
|
||||
MockCmdQWithAubSubCapture<FamilyType> cmdQ(context, pClDevice);
|
||||
cmdQ.enqueueMarkerWithWaitList(0, nullptr, nullptr);
|
||||
|
||||
EXPECT_TRUE(cmdQ.waitUntilCompleteCalled);
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueHandlerWithAubSubCaptureTests, givenEnqueueHandlerWithAubSubCaptureWhenSubCaptureGetsActivatedThenTimestampPacketDependenciesAreClearedAndNextRemainUncleared) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.AUBDumpSubCaptureMode.set(1);
|
||||
|
||||
Reference in New Issue
Block a user