From 229ce5839b04fba95612a9455ee33f2aafb8f208 Mon Sep 17 00:00:00 2001 From: Mateusz Tabaka Date: Wed, 29 May 2024 10:52:04 +0200 Subject: [PATCH] [NPU] Zero-initialize NpuInferProfiling::_dev_properties (#24758) ze_device_properties_t has pNext pointer and if it's not nullptr then it's assumed that it points to a different structure. pNext being uninitialized can lead to a crash during zeDeviceGetProperties. --- src/plugins/intel_npu/src/backend/include/zero_profiling.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/intel_npu/src/backend/include/zero_profiling.hpp b/src/plugins/intel_npu/src/backend/include/zero_profiling.hpp index 6f559aebe84..f01eff26a23 100644 --- a/src/plugins/intel_npu/src/backend/include/zero_profiling.hpp +++ b/src/plugins/intel_npu/src/backend/include/zero_profiling.hpp @@ -94,7 +94,7 @@ private: ze_device_handle_t _device_handle; ov::log::Level _loglevel; Logger _logger; - ze_device_properties_t _dev_properties; + ze_device_properties_t _dev_properties = {}; int64_t _npu_infer_stats_min_cc = LLONG_MAX; int64_t _npu_infer_stats_max_cc = 0; int64_t _npu_infer_stats_accu_cc = 0;