wangzhi16 commented on issue #17418:
URL: https://github.com/apache/nuttx/issues/17418#issuecomment-3645445239

   @anchao hi, here are two patches that can reproduce the problem mentioned 
above.
   https://github.com/apache/nuttx/compare/master...wangzhi16:nuttx:master
   
https://github.com/apache/nuttx-apps/compare/master...wangzhi16:nuttx-apps:dev
   
   Since this is an intermittent issue, blocking during the free process will 
free up the CPU. Therefore, we use `usleep` to create a scenario that is 
guaranteed to occur.
   
   <img width="1273" height="316" alt="Image" 
src="https://github.com/user-attachments/assets/116dd175-025b-434b-a6b3-e5fe864c47c9";
 />
   
   thread_parent                                    thread_child
   detach()
   group_leave()
   nxsig_cleanup()
   free()------------>block
                                                             group_leave()
                                                             check no member in 
group, release thread_parent.
                                                             exit()
   release_tcb()------->double free!!!                         


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