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

   @anchao hi, I suspect you might not have CONFIG_SCHED_HAVE_PARENT or 
CONFIG_CANCELLATION_POINTS enabled.
   
   Configuration that needs to be opened:
   ```
   CONFIG_SCHED_HAVE_PARENT=y
   CONFIG_CANCELLATION_POINTS=y
   ```
   
   
   test on sim:
   build: `tools/configure.sh sim:nsh; make -j16`
   result:
   <img width="1308" height="367" alt="Image" 
src="https://github.com/user-attachments/assets/fad6d06a-d79b-4cfd-86e4-1f9f9212f2c5";
 />
   
   test on qemu-armv7a:
   build: `tools/configure.sh qemu-armv7a:nsh; make -j16`
   result:
   <img width="1307" height="364" alt="Image" 
src="https://github.com/user-attachments/assets/7d73bc74-91f2-412f-a8b2-75a1b0de8e35";
 />
   
   
   The crash mentioned above was caused by the execution flow described below.
   ```
   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