samples: pi: fix stack overflow
This was silently corrupting memory on x86-64. Enable CONFIG_TEST so that this is detected properly, and increase the stack size appropriately. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
dcacaf7078
commit
e23102f5dc
2 changed files with 5 additions and 1 deletions
|
@ -3,3 +3,6 @@ CONFIG_MAIN_THREAD_PRIORITY=11
|
|||
|
||||
# Enable SMP
|
||||
CONFIG_SMP=y
|
||||
|
||||
# Enable assertions, stack overflow checking, etc
|
||||
CONFIG_TEST=y
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
#define DIGITS_NUM 240
|
||||
|
||||
#define LENGTH ((DIGITS_NUM / 4) * 14)
|
||||
#define STACK_SIZE (LENGTH * sizeof(int) + 512)
|
||||
#define STACK_SIZE ((LENGTH * sizeof(int) + 512) + \
|
||||
CONFIG_TEST_EXTRA_STACKSIZE)
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
#define CORES_NUM CONFIG_MP_NUM_CPUS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue