Skip to content

Commit 8184af1

Browse files
committed
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 test/kerne/mem_protect/mem_protect/userspace. Signed-off-by: Ioannis Glaropoulos <[email protected]>
1 parent ae7ce07 commit 8184af1

File tree

1 file changed

+1
-2
lines changed
  • tests/kernel/mem_protect/userspace/src

1 file changed

+1
-2
lines changed

tests/kernel/mem_protect/userspace/src/main.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -1095,8 +1095,7 @@ void test_main(void)
10951095
k_mem_domain_add_thread(&dom0, k_current_get());
10961096

10971097
#if defined(CONFIG_ARM)
1098-
priv_stack_ptr = (int *)z_priv_stack_find(ztest_thread_stack) -
1099-
MPU_GUARD_ALIGN_AND_SIZE;
1098+
priv_stack_ptr = (int *)z_priv_stack_find(ztest_thread_stack);
11001099

11011100
#endif
11021101
k_thread_access_grant(k_current_get(),

0 commit comments

Comments
 (0)