From 9bdc4f4ebf4432517e289a8dbff2ecf91fee2c17 Mon Sep 17 00:00:00 2001 From: "wangxinshuo.db" Date: Thu, 20 Jun 2024 16:13:35 +0800 Subject: [PATCH] fix coredump --- cpp/core/jni/JniWrapper.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cpp/core/jni/JniWrapper.cc b/cpp/core/jni/JniWrapper.cc index ac7da73266eb0..0fd26ebb0dac1 100644 --- a/cpp/core/jni/JniWrapper.cc +++ b/cpp/core/jni/JniWrapper.cc @@ -509,8 +509,10 @@ Java_org_apache_gluten_vectorized_NativeColumnarToRowJniWrapper_nativeColumnarTo int64_t column2RowMemThreshold; auto it = conf.find(kColumnToRowMemoryThreshold); bool confIsLeagal = - std::all_of(it->second.begin(), it->second.end(), [](unsigned char c) { return std::isdigit(c); }); - if (it != conf.end() && confIsLeagal) { + ((it == conf.end()) ? false : std::all_of(it->second.begin(), it->second.end(), [](unsigned char c) { + return std::isdigit(c); + })); + if (confIsLeagal) { column2RowMemThreshold = std::stoll(it->second); } else { column2RowMemThreshold = std::stoll(kColumnToRowMemoryDefaultThreshold);