tests: threads: fix kernel/thread_stack test
Fix the broken logic in the kernel/thread_stack test The modified test should do direct read & write from estimated stack pointer to highest address in the stack buffer. Previously this test was start from lowest address in the stack which would trigger exception of hardware stack checking scheme violation on ARC boards and other targets with hardware stack overflow detection. Signed-off-by: Yuguo Zou <yuguo.zou@synopsys.com>
This commit is contained in:
parent
eca98e37d4
commit
5b590faab5
1 changed files with 1 additions and 1 deletions
|
@ -160,8 +160,8 @@ void stack_buffer_scenarios(void)
|
|||
*
|
||||
* First test does direct read & write starting at the estimated
|
||||
* stack pointer up to the highest addresses in the buffer
|
||||
* Starting from &val which is close enough to stack pointer
|
||||
*/
|
||||
val = *stack_start;
|
||||
stack_ptr = &val;
|
||||
for (pos = stack_ptr; pos < stack_end; pos++) {
|
||||
/* pos is volatile so this doesn't get optimized out */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue