You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by he...@apache.org on 2025/11/27 15:34:05 UTC

(doris) branch master updated: [fix](ut) Fix SegmentCorruptionTest ASAN heap-buffer-overflow (#58456)

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

hellostephen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new fe7ff96eb1a [fix](ut) Fix SegmentCorruptionTest ASAN heap-buffer-overflow (#58456)
fe7ff96eb1a is described below

commit fe7ff96eb1a94906c66d35173bf43b0dc2883b2a
Author: zzzxl <ya...@selectdb.com>
AuthorDate: Thu Nov 27 23:33:57 2025 +0800

    [fix](ut) Fix SegmentCorruptionTest ASAN heap-buffer-overflow (#58456)
---
 .../olap/rowset/segment_v2/segment_corruption_test.cpp   | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/be/test/olap/rowset/segment_v2/segment_corruption_test.cpp b/be/test/olap/rowset/segment_v2/segment_corruption_test.cpp
index 3fb1549176b..c663429e160 100644
--- a/be/test/olap/rowset/segment_v2/segment_corruption_test.cpp
+++ b/be/test/olap/rowset/segment_v2/segment_corruption_test.cpp
@@ -83,8 +83,12 @@ public:
         // background threads from accessing SyncPoint during/after destruction
         SyncPoint::get_instance()->disable_processing();
 
-        if (ExecEnv::GetInstance()->file_cache_factory() != nullptr) {
-            io::FileCacheFactory::instance()->clear_file_caches(true);
+        auto* factory = io::FileCacheFactory::instance();
+        if (factory != nullptr) {
+            factory->clear_file_caches(true);
+
+            factory->_caches.clear();
+            factory->_path_to_cache.clear();
         }
 
         // Give background threads time to stop after cache destruction
@@ -132,8 +136,12 @@ public:
         // background threads from accessing SyncPoint during/after destruction
         SyncPoint::get_instance()->disable_processing();
 
-        if (ExecEnv::GetInstance()->file_cache_factory() != nullptr) {
-            io::FileCacheFactory::instance()->clear_file_caches(true);
+        auto* factory = io::FileCacheFactory::instance();
+        if (factory != nullptr) {
+            factory->clear_file_caches(true);
+
+            factory->_caches.clear();
+            factory->_path_to_cache.clear();
         }
 
         // Give background threads time to stop after cache destruction


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org