This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.1 by this push:
new ea674f11cc7 branch-3.1: [fix](ut) Fix SegmentCorruptionTest ASAN
heap-buffer-overflow #58456 (#58642)
ea674f11cc7 is described below
commit ea674f11cc71fb1ee3cb37c35274f6929d4d400f
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Dec 4 10:47:15 2025 +0800
branch-3.1: [fix](ut) Fix SegmentCorruptionTest ASAN heap-buffer-overflow
#58456 (#58642)
Cherry-picked from #58456
Co-authored-by: zzzxl <[email protected]>
---
.../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 5c7ef6f9ea9..51f7141b54d 100644
--- a/be/test/olap/rowset/segment_v2/segment_corruption_test.cpp
+++ b/be/test/olap/rowset/segment_v2/segment_corruption_test.cpp
@@ -84,8 +84,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
@@ -133,8 +137,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: [email protected]
For additional commands, e-mail: [email protected]