You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/11/22 13:30:33 UTC

[GitHub] [incubator-nuttx] tmedicci opened a new pull request, #7657: libc/machine/xtensa: make longjmp safe against context switch

tmedicci opened a new pull request, #7657:
URL: https://github.com/apache/incubator-nuttx/pull/7657

   ## Summary
   
   This PR intends to make `longjmp` context-switch safe by disabling the interrupts before modifying windowbase and windowsstart to avoid register corruption. This PR is related to an issue first observed on ESP-IDF (https://github.com/espressif/esp-idf/issues/5229) and it was, then, checked on NuttX. 
   
   ## Impact
   
   Prevents `longjump` to load corrupted registers.
   
   ## Testing
   
   Internal CI build pass considering the `ostest` and `smp` `defconfigs` for ESP32, ESP32-S2 and ESP32-S3. These `defconfigs` enables the `ostest` which run the `setjmp/longjmp` test. Also, the issue was reproduced on NuttX by a test application that performs multiple `setjmp/longjmp` operations (reference: https://en.cppreference.com/w/c/program/longjmp). This test usually crashes and, after applying the patch, the problem is gone.


-- 
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


[GitHub] [incubator-nuttx] tmedicci commented on pull request #7657: libc/machine/xtensa: make longjmp safe against context switch

Posted by GitBox <gi...@apache.org>.
tmedicci commented on PR #7657:
URL: https://github.com/apache/incubator-nuttx/pull/7657#issuecomment-1323982121

   > I'll add to the commit message a detailed description of the performed test application to help other devs evaluate if they are running into the same problem.
   
   done!


-- 
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


[GitHub] [incubator-nuttx] tmedicci commented on pull request #7657: libc/machine/xtensa: make longjmp safe against context switch

Posted by GitBox <gi...@apache.org>.
tmedicci commented on PR #7657:
URL: https://github.com/apache/incubator-nuttx/pull/7657#issuecomment-1323834516

   I'll add to the commit message a detailed description of the performed test application to help other devs evaluate if they are running into the same problem. 


-- 
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


[GitHub] [incubator-nuttx] pkarashchenko merged pull request #7657: libc/machine/xtensa: make longjmp safe against context switch

Posted by GitBox <gi...@apache.org>.
pkarashchenko merged PR #7657:
URL: https://github.com/apache/incubator-nuttx/pull/7657


-- 
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