From d15ac8fbca6b76d992e4ee3165453856eb15e5be Mon Sep 17 00:00:00 2001 From: David Yat Sin Date: Wed, 7 Sep 2022 16:39:49 -0400 Subject: [PATCH] Fix uninitialized variable warning Fix warning when using valgrind Change-Id: Ie59eaa990b9b5d339a178a2c6f9f4fac0e34e925 [ROCm/ROCR-Runtime commit: dd255d31b8038c8b4c101a1053d0ffc88f97982e] --- .../rocr-runtime/runtime/hsa-runtime/core/util/lnx/os_linux.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/util/lnx/os_linux.cpp b/projects/rocr-runtime/runtime/hsa-runtime/core/util/lnx/os_linux.cpp index 87b676413f..afa71bd5cd 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/util/lnx/os_linux.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/util/lnx/os_linux.cpp @@ -103,6 +103,7 @@ class os_thread { if (core::Runtime::runtime_singleton_->flag().override_cpu_affinity()) { int cores = get_nprocs_conf(); cpu_set_t* cpuset = CPU_ALLOC(cores); + CPU_ZERO_S(CPU_ALLOC_SIZE(cores), cpuset); for (int i = 0; i < cores; i++) { CPU_SET(i, cpuset); }