From 8e15127ea43d38e751ac4fd2953794381363e012 Mon Sep 17 00:00:00 2001 From: jiadexiang Date: Fri, 12 Aug 2022 17:38:02 +0800 Subject: [PATCH] FIX: add CJSON_NESTING_LIMIT as 128 for stack overflow issue Signed-off-by: panchengzhong <1144372483@qq.com> --- config/component/cJSON/BUILD.gn | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/component/cJSON/BUILD.gn b/config/component/cJSON/BUILD.gn index e0f8e6c..dfab4fc 100755 --- a/config/component/cJSON/BUILD.gn +++ b/config/component/cJSON/BUILD.gn @@ -19,6 +19,13 @@ import("//build/lite/ndk/ndk.gni") config("cjson_config") { include_dirs = [ "//third_party/cJSON" ] ldflags = [ "-lm" ] + defines = [ "CJSON_NESTING_LIMIT=(128)" ] + if (board_toolchain_type == "iccarm") { + cflags = [ + "--diag_suppress", + "Pa084", + ] + } } cjson_sources = [ -- Gitee