Skip to content
Browse files

tests: kernel: userspace: correct address of thread priv stack start

In ARM architecture z_priv_stack_find() returns the start of a
thread's privilege stack; we do not need to subtract the length
of a (possible) stack guard. This commit corrects the assigning
of the start address of a thread privilege stack in

Signed-off-by: Ioannis Glaropoulos <>
  • Loading branch information...
ioannisg authored and andrewboie committed Jun 14, 2019
1 parent c06a74c commit 02a3c52084ac18e99156afc3ef29815078e52fa1
Showing with 1 addition and 2 deletions.
  1. +1 −2 tests/kernel/mem_protect/userspace/src/main.c
@@ -1095,8 +1095,7 @@ void test_main(void)
k_mem_domain_add_thread(&dom0, k_current_get());

#if defined(CONFIG_ARM)
priv_stack_ptr = (int *)z_priv_stack_find(ztest_thread_stack) -
priv_stack_ptr = (int *)z_priv_stack_find(ztest_thread_stack);


0 comments on commit 02a3c52

Please sign in to comment.
You can’t perform that action at this time.