xiaoxiang781216 commented on PR #17468:
URL: https://github.com/apache/nuttx/pull/17468#issuecomment-3832852369

   > > > I won't let this submission be merged:
   > > > 
   > > > 1. code size will increase.
   > > > 2. performance will degrade.
   > > 
   > > 
   > > without refcount, the used after free will happen under the stress 
testing of task/thread create/destroy. Used after free is a critical bug which 
must be fixed. refcount is one of well known method to fix this type of error, 
if you have better suggestion/method, please point out.
   > 
   > 1. This is because in your business logic, Task A still holds the 
resources of Task B when it exits. Why can't the resources be released properly?
   > 2. Most IoT and wearable devices use a fixed thread pool. If your business 
process involves the frequent creation and destruction of a large number of 
threads, why not design them as deterministic tasks and implement the creation 
and exit logic with wait/notify mechanisms?
   
   No, I just consider POSIX spec, not private business logic. POSIX spec allow 
appliation create/destroy task/thread dynamically, we need fix the problem. 
Let's hightlight the inviolable rule here:
   
https://github.com/apache/nuttx/blob/master/INVIOLABLES.md#strict-posix-compliance
   
   > 3. The only acceptable solution to me is to make this feature configurable 
via Kconfig – no other options are on the table.
   
   it's bug fix, I don't why we add an option to choice whether fix a critical 
bug.


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