This is an automated email from the ASF dual-hosted git repository.

felixybw pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new a7301e199d [GLUTEN-8471][VL] Fix usage of uninitialized variables 
(#8470)
a7301e199d is described below

commit a7301e199dae989f85a60336d5b459dbce98cd4b
Author: jkhaliqi <[email protected]>
AuthorDate: Fri Jan 10 17:11:57 2025 -0800

    [GLUTEN-8471][VL] Fix usage of uninitialized variables (#8470)
    
    fix security volation
---
 cpp/velox/memory/VeloxMemoryManager.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpp/velox/memory/VeloxMemoryManager.cc 
b/cpp/velox/memory/VeloxMemoryManager.cc
index 597ce1c9da..46c5186f5b 100644
--- a/cpp/velox/memory/VeloxMemoryManager.cc
+++ b/cpp/velox/memory/VeloxMemoryManager.cc
@@ -126,7 +126,7 @@ class ListenableArbitrator : public 
velox::memory::MemoryArbitrator {
   uint64_t shrinkCapacity(uint64_t targetBytes, bool allowSpill, bool 
allowAbort) override {
     velox::memory::ScopedMemoryArbitrationContext ctx{};
     facebook::velox::exec::MemoryReclaimer::Stats status;
-    velox::memory::MemoryPool* pool;
+    velox::memory::MemoryPool* pool = nullptr;
     {
       std::unique_lock guard{mutex_};
       VELOX_CHECK_EQ(candidates_.size(), 1, "ListenableArbitrator should only 
be used within a single root pool");
@@ -178,7 +178,7 @@ class ListenableArbitrator : public 
velox::memory::MemoryArbitrator {
     return freeBytes;
   }
 
-  gluten::AllocationListener* listener_;
+  gluten::AllocationListener* listener_ = nullptr;
   const uint64_t memoryPoolInitialCapacity_; // FIXME: Unused.
   const uint64_t memoryPoolTransferCapacity_;
   const uint64_t memoryReclaimMaxWaitMs_;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to