diff --git a/core/arch/arm/include/kernel/thread_private_arch.h b/core/arch/arm/include/kernel/thread_private_arch.h index d52f96b4236..d5b188429c3 100644 --- a/core/arch/arm/include/kernel/thread_private_arch.h +++ b/core/arch/arm/include/kernel/thread_private_arch.h @@ -37,12 +37,17 @@ #endif /*ARM32*/ #ifdef ARM64 -#if defined(__clang__) && !defined(__OPTIMIZE_SIZE__) +#if (defined(__clang__) && !defined(__OPTIMIZE_SIZE__)) || \ + defined(CFG_CORE_SANITIZE_KADDRESS) #define STACK_TMP_SIZE (4096 + STACK_TMP_OFFS + CFG_STACK_TMP_EXTRA) #else #define STACK_TMP_SIZE (2048 + STACK_TMP_OFFS + CFG_STACK_TMP_EXTRA) #endif +#if defined(CFG_CORE_SANITIZE_KADDRESS) +#define STACK_THREAD_SIZE (10240 + CFG_STACK_THREAD_EXTRA) +#else #define STACK_THREAD_SIZE (8192 + CFG_STACK_THREAD_EXTRA) +#endif #if TRACE_LEVEL > 0 #define STACK_ABT_SIZE 3072