diff --git a/arch/x86_64/src/intel64/intel64_stackframe.c b/arch/x86_64/src/intel64/intel64_stackframe.c index 4ebc9c4066..2381aeef2f 100644 --- a/arch/x86_64/src/intel64/intel64_stackframe.c +++ b/arch/x86_64/src/intel64/intel64_stackframe.c @@ -85,7 +85,7 @@ void *up_stack_frame(struct tcb_s *tcb, size_t frame_size) } ret = tcb->stack_base_ptr; - memset(ret, 0, tcb->adj_stack_size); + memset(ret, 0, frame_size); /* Save the adjusted stack values in the struct tcb_s */