mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 09:03:14 +08:00
fix: default initialize allocated memory when memory is overwritten
Related-To: NEO-5093 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
8ec5434460
commit
a86105814d
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2024 Intel Corporation
|
||||
* Copyright (C) 2020-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -93,7 +93,7 @@ const SipKernel &BuiltIns::getSipKernel(Device &device, OsContext *context) {
|
||||
UNRECOVERABLE_IF(bindlessSip.getBinary().size() == 0);
|
||||
|
||||
auto binarySize = alignUp(bindlessSip.getBinary().size(), sizeof(uint32_t)) / sizeof(uint32_t);
|
||||
auto binary = std::make_unique<uint32_t[]>(binarySize);
|
||||
auto binary = std::make_unique_for_overwrite<uint32_t[]>(binarySize);
|
||||
memcpy_s(binary.get(), binarySize * sizeof(uint32_t), bindlessSip.getBinary().data(), bindlessSip.getBinary().size());
|
||||
|
||||
const auto allocType = AllocationType::kernelIsaInternal;
|
||||
|
||||
Reference in New Issue
Block a user