From dde482d224cea5cf8cdcb246fdc1c0cfe01e8e05 Mon Sep 17 00:00:00 2001 From: axie_amdeng <54727243+AlexXAmd@users.noreply.github.com> Date: Tue, 14 Oct 2025 16:57:10 -0400 Subject: [PATCH] rocr: unitialized size variable caused huge memory/space allocation (#1232) Signed-off-by: Alex Xie --- .../rocr-runtime/runtime/hsa-runtime/core/util/simple_heap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/util/simple_heap.h b/projects/rocr-runtime/runtime/hsa-runtime/core/util/simple_heap.h index 3d45a54b2b..367c59a920 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/util/simple_heap.h +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/util/simple_heap.h @@ -134,7 +134,7 @@ template class SimpleHeap { // Find best fit. auto free_fragment = free_list_.lower_bound(bytes); uintptr_t base; - size_t size; + size_t size = 0; if (free_fragment != free_list_.end()) { base = free_fragment->second;