You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "yf13 (via GitHub)" <gi...@apache.org> on 2024/07/17 02:41:11 UTC

[PR] arch/riscv: fix issue #12635 [nuttx]

yf13 opened a new pull request, #12717:
URL: https://github.com/apache/nuttx/pull/12717

   ## Summary
   
   This amends pull #12435 and attempts to fix issue #12635 of PROTECTED build vfork failure since commit e6973c764cd531.
   
   Investigation revealed two separate issues:
   
   - The optimized `dispatch_syscall` now requires TP to be prepared, which normally isn't a problem. But for the very first run of the forked child, it was zero. So we need prepare it for the forked child specially before its first run.
   
   - When returning from exception, the SP restored from stack normally works, As forked child stack is copied from parent, thus restored SP from child stack actually points to the parent stack area! So if child executes ealier that parent reaches the waitpid, parent will crash later due to corrupted stack. Unfortunately this is true with PROTECTED build now.
   
   ## Impacts
   
   riscv devices
   
   ## Testing
   
   - Local checks with canmv230:pnsh for issue #12635 verification
   - Local checks with following configs for regression
     - canmv230: nsh, nsbi
     - rv-virt: nsh, flats, knsh32, smp, ksmp
   - CI checks
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] arch/riscv: fix trap sp restore logic [nuttx]

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #12717:
URL: https://github.com/apache/nuttx/pull/12717


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org