fix: add unrecoverable to avoid OOB access

Related-To: NEO-9860
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2024-01-15 13:57:17 +00:00
committed by Compute-Runtime-Automation
parent 9215f3acb5
commit 556645e0c5
6 changed files with 31 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -55,6 +55,7 @@ GraphicsAllocation::GraphicsAllocation(uint32_t rootDeviceIndex, size_t numGmms,
GraphicsAllocation::~GraphicsAllocation() = default;
void GraphicsAllocation::updateTaskCount(TaskCountType newTaskCount, uint32_t contextId) {
UNRECOVERABLE_IF(contextId >= usageInfos.size());
if (usageInfos[contextId].taskCount == objectNotUsed) {
registeredContextsNum++;
}