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

               
      Provide task stack overflow check mechanism in task context switch,
      and add porting on arm arch
   
   *Note: Please adhere to [Contributing 
Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
   
   ## Summary
   
   Provide a task stack overflow check mechanism during task context switch.
   This method is based on  stack coloration and a threshold. The stack 
overflow check will
   fail if fewer than this number of bytes of unused stack remain after the 
stack coloration pattern
   
   ## Impact
   
   Add a stack overflow check mechanism to scheduler, this function is default 
disabled. If it is enabled, 
   some performance load will be introduced during task switch.
   
   ## Testing
   
   **enable it on board fvp-armv8r-aarch32**
   <img width="868" height="624" alt="image" 
src="https://github.com/user-attachments/assets/f6c072ff-caac-436d-aaba-df752a78c526";
 />
   
   **ostest passed** 
   <img width="787" height="558" alt="image" 
src="https://github.com/user-attachments/assets/540fac73-960e-445a-8efa-1d67d6e01527";
 />
   
   **Trigger a stack overflow in hello world demo**
   
   <img width="829" height="761" alt="image" 
src="https://github.com/user-attachments/assets/21ac36ed-4b0b-4141-9fd7-a24076e12c45";
 />
   
   **stack overflow detected**
   <img width="1010" height="769" alt="image" 
src="https://github.com/user-attachments/assets/d316fddc-ea8a-4c80-ab35-1e88ba5bc683";
 />
   
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to