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

exmy 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 e9ac2137c3 [GLUTEN-9679][CH] Fix: invalid address access in str_to_map 
(#9680)
e9ac2137c3 is described below

commit e9ac2137c37c717274f6f6435c75b0c63cf0d95e
Author: lgbo <[email protected]>
AuthorDate: Mon May 19 14:02:40 2025 +0800

    [GLUTEN-9679][CH] Fix: invalid address access in str_to_map (#9680)
---
 cpp-ch/local-engine/Functions/SparkFunctionStrToMap.cpp | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/cpp-ch/local-engine/Functions/SparkFunctionStrToMap.cpp 
b/cpp-ch/local-engine/Functions/SparkFunctionStrToMap.cpp
index 2fa8a6ec58..0c4d4ea347 100644
--- a/cpp-ch/local-engine/Functions/SparkFunctionStrToMap.cpp
+++ b/cpp-ch/local-engine/Functions/SparkFunctionStrToMap.cpp
@@ -55,7 +55,7 @@ class TrivialCharSplitter
 {
 public:
     using Pos = const char *;
-    TrivialCharSplitter(String & delimiter_) : delimiter(delimiter_) { }
+    TrivialCharSplitter(const String & delimiter_) : delimiter(delimiter_) { }
 
     void reset(Pos str_begin_, Pos str_end_)
     {
@@ -76,15 +76,12 @@ public:
         token_begin = str_cursor;
         auto next_token_pos = static_cast<Pos>(memmem(str_cursor, str_end - 
str_cursor, delimiter.c_str(), delimiter.size()));
         // If delimiter is not found, return the remaining string.
-        LOG_ERROR(getLogger("TrivialCharSplitter"), "xxx next_token_pos: {}", 
fmt::ptr(next_token_pos));
         if (!next_token_pos)
         {
             token_end = str_end;
             str_cursor = str_end;
             delimiter_begin = nullptr;
             delimiter_end = nullptr;
-            LOG_ERROR(
-                getLogger("TrivialCharSplitter"), "xxx delimiter_begin: {} 
{}", delimiter_begin == nullptr, fmt::ptr(delimiter_begin));
         }
         else
         {
@@ -97,7 +94,7 @@ public:
     }
 
 private:
-    const String & delimiter;
+    String delimiter;
     Pos str_begin;
     Pos str_end;
     Pos str_cursor;
@@ -161,7 +158,7 @@ public:
     }
 
 private:
-    const String & delimiter;
+    String delimiter;
     DB::Regexps::RegexpPtr re;
     OptimizedRegularExpression::MatchVec matches;
     Pos str_begin;


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

Reply via email to