arch/mips/src/mips32/up_vfork.c: Fix a copy-paste error. On vfork, the GP register was being set to the new SP value vs. the context GP value. NOTED in Bitbucket issue 155.

This commit is contained in:
Gregory Nutt 2019-05-22 08:51:51 -06:00
parent ae2a3d4efd
commit 7ef69fea47

View File

@ -251,7 +251,7 @@ pid_t up_vfork(const struct vfork_s *context)
#endif #endif
child->cmn.xcp.regs[REG_SP] = newsp; /* Stack pointer */ child->cmn.xcp.regs[REG_SP] = newsp; /* Stack pointer */
#ifdef MIPS32_SAVE_GP #ifdef MIPS32_SAVE_GP
child->cmn.xcp.regs[REG_GP] = newsp; /* Global pointer */ child->cmn.xcp.regs[REG_GP] = context->gp; /* Global pointer */
#endif #endif
/* And, finally, start the child task. On a failure, nxtask_vforkstart() /* And, finally, start the child task. On a failure, nxtask_vforkstart()