From 60dd4ded63bc91596ba2209ff2f9d704e88d1491 Mon Sep 17 00:00:00 2001 From: Chang Chen Date: Fri, 14 Jun 2024 09:54:27 +0800 Subject: [PATCH 1/4] Fix build due to https://github.com/ClickHouse/ClickHouse/pull/64365 --- cpp-ch/local-engine/Functions/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cpp-ch/local-engine/Functions/CMakeLists.txt b/cpp-ch/local-engine/Functions/CMakeLists.txt index 74697315597b..1176cf828a87 100644 --- a/cpp-ch/local-engine/Functions/CMakeLists.txt +++ b/cpp-ch/local-engine/Functions/CMakeLists.txt @@ -59,6 +59,10 @@ if(TARGET ch_rust::blake3) list(APPEND PRIVATE_LIBS ch_rust::blake3) endif() +if (TARGET ch_contrib::gwp_asan) + list(APPEND PRIVATE_LIBS ch_contrib::gwp_asan) +endif() + list(APPEND OBJECT_LIBS $) target_link_libraries(gluten_spark_functions_obj PRIVATE ${PRIVATE_LIBS}) From ec28263d3c50df12afe35cf37001a6160b2b19b6 Mon Sep 17 00:00:00 2001 From: Chang Chen Date: Fri, 14 Jun 2024 14:36:39 +0800 Subject: [PATCH 2/4] fix style --- cpp-ch/local-engine/Functions/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp-ch/local-engine/Functions/CMakeLists.txt b/cpp-ch/local-engine/Functions/CMakeLists.txt index 1176cf828a87..6f5c9c6b78cd 100644 --- a/cpp-ch/local-engine/Functions/CMakeLists.txt +++ b/cpp-ch/local-engine/Functions/CMakeLists.txt @@ -60,7 +60,7 @@ if(TARGET ch_rust::blake3) endif() if (TARGET ch_contrib::gwp_asan) - list(APPEND PRIVATE_LIBS ch_contrib::gwp_asan) + list(APPEND PRIVATE_LIBS ch_contrib::gwp_asan) endif() list(APPEND OBJECT_LIBS $) From 0ee3f01e0cf53feb770385f17bbbe06b506a4f22 Mon Sep 17 00:00:00 2001 From: Chang Chen Date: Fri, 14 Jun 2024 15:34:40 +0800 Subject: [PATCH 3/4] Avoid using LD_PRELOAD in child process --- cpp-ch/local-engine/Common/CHUtil.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpp-ch/local-engine/Common/CHUtil.cpp b/cpp-ch/local-engine/Common/CHUtil.cpp index fa6124cf011f..2dd5f67687db 100644 --- a/cpp-ch/local-engine/Common/CHUtil.cpp +++ b/cpp-ch/local-engine/Common/CHUtil.cpp @@ -894,6 +894,9 @@ void BackendInitializerUtil::init(std::string * plan) cleanup_threads, 0, // We don't need any threads one all the parts will be deleted cleanup_threads); + + // Avoid using LD_PRELOAD in child process + unsetenv("LD_PRELOAD"); }); } From 8c3a1bbd473b0893a820338185cbbf5ff24aab99 Mon Sep 17 00:00:00 2001 From: Chang Chen Date: Fri, 14 Jun 2024 15:48:24 +0800 Subject: [PATCH 4/4] fix style --- cpp-ch/local-engine/Functions/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp-ch/local-engine/Functions/CMakeLists.txt b/cpp-ch/local-engine/Functions/CMakeLists.txt index 6f5c9c6b78cd..9e31595e03d5 100644 --- a/cpp-ch/local-engine/Functions/CMakeLists.txt +++ b/cpp-ch/local-engine/Functions/CMakeLists.txt @@ -59,7 +59,7 @@ if(TARGET ch_rust::blake3) list(APPEND PRIVATE_LIBS ch_rust::blake3) endif() -if (TARGET ch_contrib::gwp_asan) +if(TARGET ch_contrib::gwp_asan) list(APPEND PRIVATE_LIBS ch_contrib::gwp_asan) endif()