From 28cc126c6cc2ccb150c35b368437c74e182fcb57 Mon Sep 17 00:00:00 2001 From: tushicheng <18829573815@163.com> Date: Mon, 17 Jun 2024 13:23:25 +0000 Subject: [PATCH] enable memleak with light_backtrace online --- CMakeLists.txt | 2 -- deps/oblib/src/lib/alloc/alloc_struct.cpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d412c171..bd6365864 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,8 +93,6 @@ if (ENABLE_FATAL_ERROR_HANG) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DFATAL_ERROR_HANG") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_500_MEMORY_LIMIT") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DENABLE_500_MEMORY_LIMIT") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_LIGHT_BACKTRACE") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DENABLE_LIGHT_BACKTRACE") endif() if(OB_USE_ASAN) diff --git a/deps/oblib/src/lib/alloc/alloc_struct.cpp b/deps/oblib/src/lib/alloc/alloc_struct.cpp index 27b33ad1d..93bd58db2 100644 --- a/deps/oblib/src/lib/alloc/alloc_struct.cpp +++ b/deps/oblib/src/lib/alloc/alloc_struct.cpp @@ -137,7 +137,7 @@ bool is_ob_mem_mgr_path() void enable_memleak_light_backtrace(const bool enable) { -#if defined(ENABLE_LIGHT_BACKTRACE) +#if defined(__x86_64__) || defined(__aarch64__) g_memleak_light_backtrace_enabled = enable; #else UNUSED(enable);