mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
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:
committed by
Compute-Runtime-Automation
parent
9215f3acb5
commit
556645e0c5
@@ -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++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user