mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
sim: fix sim runtime err under sanitize check mode.
since gcc sanitize can not stub proper code in nuttx kernel code. Change-Id: I0910bddee71538c202c6a0a8faab76bcc65f5cd2
This commit is contained in:
@@ -89,6 +89,8 @@ pid_t up_vfork(const xcpt_reg_t *context)
|
||||
{
|
||||
struct tcb_s *parent = this_task();
|
||||
struct task_tcb_s *child;
|
||||
unsigned char *pout;
|
||||
unsigned char *pin;
|
||||
xcpt_reg_t newsp;
|
||||
xcpt_reg_t newfp;
|
||||
xcpt_reg_t newtop;
|
||||
@@ -133,7 +135,9 @@ pid_t up_vfork(const xcpt_reg_t *context)
|
||||
newtop = (xcpt_reg_t)child->cmn.stack_base_ptr +
|
||||
child->cmn.adj_stack_size;
|
||||
newsp = newtop - stackutil;
|
||||
memcpy((void *)newsp, (const void *)context[JB_SP], stackutil);
|
||||
pout = (unsigned char *)newsp;
|
||||
pin = (unsigned char *)context[JB_SP];
|
||||
while (stackutil-- > 0) *pout++ = *pin++;
|
||||
|
||||
/* Was there a frame pointer in place before? */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user