yushuailong opened a new pull request, #20768:
URL: https://github.com/apache/nuttx/pull/20768
## Summary
* Fixes two resource cleanup issues in `nx_pthread_create()` error
handling.
* Stops initialized sporadic scheduling before releasing the TCB,
preventing replenishment timers from referencing freed memory.
* Removes a scheduler-initialized TCB from the inactive task list before
releasing it after a later initialization step fails.
* No related NuttX issue is currently referenced.
## Impact
* Is new feature added? NO.
* Impact on user (will user need to adapt to change)? NO.
* Impact on build (will build process change)? NO.
* Impact on hardware (will arch(s) / board(s) / driver(s) change)? NO. The
change is in generic pthread creation cleanup.
* Impact on documentation (is update required / provided)? NO.
* Impact on security (any sort of implications)? NO.
* Impact on compatibility (backward/forward/interoperability)? NO.
* Anything else to consider or add? The cleanup handles both sporadic
state and inactive-list membership before releasing the TCB.
## Testing
Build host: macOS 26.6.2 ARM64, Apple Clang 21.0.0.
Target: sim:ostest.
Build: make completes successfully with LD: nuttx.
Static checks: nxstyle, checkpatch pass.
Runtime smoke test: ./nuttx starts and proceeds through enabled OSTest cases
without an assertion in the observed run.
## PR verification Self-Check
* [x] This PR introduces only one functional change.
* [x] I have updated all required description fields above.
* [x] My PR adheres to Contributing Guidelines and Documentation
requirements.
* [x] My PR is still work in progress (not ready for review).
* [ ] My PR is ready for review and can be safely merged into a codebase.
--
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]