Repository navigation
Conversation
Stack checking adjusted stack addresses without documenting pointer width. Clarified alignment, checking reserves, and full-width pointer preservation. The candidate rendered successfully with Antora and passed independent review. Assisted-by: Codex (gpt-6.1-sol) <noreply@openai.com>
fdesbiens
left a comment
There was a problem hiding this comment.
Thanks @jnsagai. The kernel side is merged. For the docs, I'd like to keep only the part of this paragraph that describes the API.
The first sentence is right and useful, but it can be more concrete about what a reader is sizing for. Suggested wording: "When TX_ENABLE_STACK_CHECKING is defined, ThreadX reserves part of the stack area for overflow detection: stack_size is rounded down to a whole number of ULONGs and reduced by one ULONG, and when stack_start is not ULONG-aligned, the start is rounded up and the size reduced by one more ULONG."
Please drop the other two sentences. Preserving the full address is what any reader expects already. Stating it "including when TX_MISRA_ENABLE is also enabled" describes the fix in threadx#799, not the API, and it is not true of 6.4.x, which this manual also describes. The fix belongs in the release notes. The advice against narrowing the pointer is general C guidance, and stack_start is already a VOID *.
With that change the commit subject no longer fits. Something like "Documented the stack reserve applied by stack checking" would.
Companion documentation for eclipse-threadx/threadx#744, targeting
mainineclipse-threadx/rtos-docs-asciidoc.The
tx_thread_createDescription does not explain the corrected stack-address contract when stack checking and MISRA are both enabled. Added one paragraph describing alignment and pattern reservations within the supplied memory area, preservation of the full stack address, and passingstack_startdirectly as a pointer without a narrowing integer cast. The existing port type-width content from merged docs PR #79 is not duplicated.Confirmed the wording against the actual
common/src/tx_thread_create.c: stack checking reduces the usable size for pattern reservations and alignment, and both address conversions useALIGN_TYPEwith no MISRA-specific narrowing path. Reviewed the existing regression implementation and red/green evidence; the recorded fixed run passes all six focused tests. Those existing results support the contract and are not a new test run for this documentation change.Validation: local documentation diff and whitespace checks passed. The candidate rendered successfully with Antora; the generated tx_thread_create page contains the added paragraph. The independent documentation review passed on this patch. Human technical and provenance review was confirmed for this patch. Upstream approval and final-head ECA checks remain pending.
AI assistance: Codex (gpt-6.1-sol) read both contribution guides, the kernel implementation and evidence, authored the documentation paragraph and this PR draft, and checked the local diff. The submitting human remains responsible for reviewing and verifying the contribution.
The human contributor reviewed both linked contribution patches and confirmed provenance before submission.
Matching kernel fix: eclipse-threadx/threadx#799.