From a36d3077d0acd7a9cc73a6ad683d62e5bb49cbba Mon Sep 17 00:00:00 2001 From: Chang chen Date: Fri, 14 Jun 2024 21:12:43 +0800 Subject: [PATCH] [GLUTEN-6091][CH] Avoid using LD_PRELOAD in child process (#6092) [CH] Avoid using LD_PRELOAD in child process --- cpp-ch/local-engine/Common/CHUtil.cpp | 3 +++ cpp-ch/local-engine/Functions/CMakeLists.txt | 4 ++++ 2 files changed, 7 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"); }); } diff --git a/cpp-ch/local-engine/Functions/CMakeLists.txt b/cpp-ch/local-engine/Functions/CMakeLists.txt index 74697315597b..9e31595e03d5 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})