From d796e92a68afbef5e7cb9a097502a653901a4147 Mon Sep 17 00:00:00 2001 From: ganchuantao Date: Sat, 6 Sep 2025 18:04:51 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9AFFRT=20public=5Fconfig=E8=A7=84?= =?UTF-8?q?=E8=8C=83=E6=80=A7=E6=95=B4=E6=94=B9=20Signed-off-by:ganchuanta?= =?UTF-8?q?o=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ganchuantao --- device/plugins/native_hook/src/hook_client.cpp | 5 ----- device/plugins/native_hook/src/hook_socket_client.cpp | 1 - device/plugins/native_hook/src/runtime_stack_range.cpp | 5 ----- 3 files changed, 11 deletions(-) diff --git a/device/plugins/native_hook/src/hook_client.cpp b/device/plugins/native_hook/src/hook_client.cpp index c3b2c9916..15678e3b7 100644 --- a/device/plugins/native_hook/src/hook_client.cpp +++ b/device/plugins/native_hook/src/hook_client.cpp @@ -84,21 +84,16 @@ constexpr int STATUS_LINE_SIZE = 512; constexpr int PID_NAMESPACE_ID = 1; // 1: pid is 1 after pid namespace used constexpr int FD_PATH_LENGTH = 64; constexpr int MIN_SAMPLER_INTERVAL = 1; -constexpr int FIRST_HASH = 16; -constexpr int SECOND_HASH = 13; constexpr int THRESHOLD = 256; -constexpr int DIVIDE_VAL = 64; constexpr uintptr_t MAX_UNWIND_ADDR_RANGE = 16 * 1024; //5: fp mode is used, response_library_mode maximum stack depth #if defined(__aarch64__) constexpr int RESPONSE_LIBRARY_MODE_DEPTH = 5; -constexpr int TEMP_IP = 100; std::shared_ptr g_wholeAddrHandler = nullptr; std::shared_ptr g_midPartHandler = nullptr; #endif std::shared_ptr g_addrHandler = nullptr; static bool g_isPidChanged = false; -static struct mallinfo2 g_miStart = {0}; std::vector> g_filterStaLibRange; std::atomic targetedRange; constexpr int MAX_BITPOOL_SIZE = 1000 * 1024; diff --git a/device/plugins/native_hook/src/hook_socket_client.cpp b/device/plugins/native_hook/src/hook_socket_client.cpp index bbc7c3e03..23d718b5f 100644 --- a/device/plugins/native_hook/src/hook_socket_client.cpp +++ b/device/plugins/native_hook/src/hook_socket_client.cpp @@ -30,7 +30,6 @@ #include namespace { -constexpr int FLUSH_FLAG = 20; constexpr int ONLY_NMD_TYPE = 2; constexpr int SIMP_NMD = 3; std::atomic g_disableHook = true; diff --git a/device/plugins/native_hook/src/runtime_stack_range.cpp b/device/plugins/native_hook/src/runtime_stack_range.cpp index 95b2b62d3..337777d24 100644 --- a/device/plugins/native_hook/src/runtime_stack_range.cpp +++ b/device/plugins/native_hook/src/runtime_stack_range.cpp @@ -146,11 +146,6 @@ bool ParseTargetedMaps(std::atomic& targetedRange, std::string targetedLi return ret; } char mapInfo[256] = {0}; // 256: map info size - int pos = 0; - uint64_t begin = 0; - uint64_t end = 0; - uint64_t offset = 0; - char perms[5] = {0}; // 5:rwxp while (fgets(mapInfo, sizeof(mapInfo), fp) != nullptr) { if (strstr(mapInfo, targetedLib.c_str()) != nullptr) { std::string lineStr = mapInfo; -- Gitee