Repository navigation
Added ARMv7-A TX_THREAD offset checks - #800
Conversation
The ARMv7-A assembly uses hard-coded offsets to access TX_THREAD members. Changes to the structure layout could break these accesses. Added compile-time checks in the shared ARMv7-A source tree and regenerated the GNU and AC6 port copies. Built all seven GNU port and verified that an incorrect VFP offset causes a compilation failure. Assisted-by: ChatGPT (GPT-5.6 Sol)
fdesbiens
left a comment
There was a problem hiding this comment.
Hi @JeewoongKim. Thank you for this contribution. The assertions cover the hard-coded offsets I checked in the ARMv7-A assembly, and the reported GNU builds include a useful negative check. Could you resolve the commit’s Assisted-by trailer with the maintainer so it has the accepted format and an email address, and remove the AI-process paragraphs from the PR description? The stated AC6 build limitation is clear.
|
Thanks for the review! I've removed the AI-process paragraphs from the PR description. For the |
|
Hi @fdesbiens , just following up 👆 |
The VFP offset checker compared the thread field with an overridable macro even though the assembly always accesses byte offset 144. A build could match a changed structure layout and bypass the guard. Compared the field directly with 144 and regenerated the GNU and AC6 copies. Corrected the new-file headers to disclose the contributor's stated ChatGPT assistance. All seven GNU Cortex-A port libraries built with GCC 14, CMake and Ninja. The AC6 ports were not built. Assisted-by: Codex (GPT-6-Sol) <noreply@openai.com>
3266793 to
2d0bede
Compare
fdesbiens
left a comment
There was a problem hiding this comment.
The offset assertions cover the fixed ARMv7-A assembly offsets. The VFP assertion now checks 144 directly. All seven GNU ports built with GCC 14; AC6 was not built.
The ARMv7-A assembly reads
TX_THREADfields through fixed byte offsets. A structure-layout change could silently make those reads incorrect.Added compile-time checks for those offsets to the shared ARMv7-A source and all seven Cortex-A GNU and AC6 ports. The VFP check compares directly with the offset used by the assembly, and the GNU CMake builds compile the checker.
All seven GNU ports (A5, A7, A8, A9, A12, A15, A17) built with GCC 14, CMake, and Ninja. A VFP offset mismatch failed the compile-time assertion. The AC6 ports were not built.