nuttx
nuttx copied to clipboard
poll: fix thread_cancel() caused poll used after free
Summary
poll: fix thread_cancel() caused poll used after free
pthread 0 pthread1
fd 0
poll_setup
wait
cancel(thread 0)
fd 0 close
fd 0 notify (sem used after free)
poll_teardown
Resolve: Use pthread_cleanup / tls_cleanup to fix this
Impact
POLL
Testing
SIM
@liguiding Please rebase to the last master which fix the ci broken.
@GUIDINGLI Is CONFIG_PTHREAD_CLEANUP_STACKSIZE->CONFIG_TLS_NCLEANUP going to break everyone's out of repo code? Should it be marked as a breaking change?