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

   ## Summary
   This reverts commit 29e50ffa7374fa4c473d8d4f8cb3506665443d3e.
   
   reason:
   Placing the main thread and the gourd in the same memory block, and 
allocating and freeing memory simultaneously, presents the following two 
problems:
   
   When the main thread creates a child thread and performs a detach operation, 
there is a possibility that the main thread may have exited, but the main 
thread's TCB (Transaction Control Block) may not have been released.
   
   This could potentially cause the main thread's TCB to be double-freed. The 
core contradiction in this problem lies in binding the main thread's TCB (Trust 
Container Registry) and the group together. When releasing the main thread's 
TCB, an additional check is needed to ensure the main thread was the last to 
leave the group. If this check and the free operation are atomically 
guaranteed, the logic is sound, and double freeing won't occur. However, this 
atomicity cannot be completely guaranteed. If other free operations cause a 
block, problems still arise.
   
   ## Impact
   RELEASE
   
   ## Testing
   CI


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