From 3919224101619910a24fb06f1b452cf847e22ba5 Mon Sep 17 00:00:00 2001 From: liuneng <1398775315@qq.com> Date: Wed, 10 Apr 2024 15:17:12 +0800 Subject: [PATCH] ignore thread sanitize --- src/Common/DateLUT.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Common/DateLUT.cpp b/src/Common/DateLUT.cpp index e83bf2466d8f..01de79333c24 100644 --- a/src/Common/DateLUT.cpp +++ b/src/Common/DateLUT.cpp @@ -182,7 +182,9 @@ DateLUT::DateLUT() } -const DateLUTImpl & DateLUT::getImplementation(const std::string & time_zone) const +/// skip thread sanitizer, because the initialization of each time zone data will only happen once. +/// There should be no serious data race here. +const DateLUTImpl & DateLUT::getImplementation(const std::string & time_zone) const __attribute__((no_sanitize("thread"))) { // First check without acquiring the lock auto it = impls.find(time_zone);