Skip to content

Commit

Permalink
core: asan: arm64: increase stack sizes for ASAN
Browse files Browse the repository at this point in the history
Increase STACK_TMP_SIZE and STACK_THREAD_SIZE when
CFG_CORE_SANITIZE_KADDRESS=y. With that, xtest passes on QEMUv8.

Signed-off-by: Jerome Forissier <[email protected]>
  • Loading branch information
jforissier committed Aug 23, 2023
1 parent 50ec9be commit bb1e599
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/arch/arm/include/kernel/thread_private_arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bb1e599

Please sign in to comment.