Skip to content

Added ARMv7-A TX_THREAD offset checks - #800

Merged
fdesbiens merged 2 commits into
eclipse-threadx:devfrom
JeewoongKim:fix/armv7a-gnu-offset-check
Nov 24, 2026
Merged

fdesbiens merged 2 commits into
eclipse-threadx:devfrom
JeewoongKim:fix/armv7a-gnu-offset-check

Conversation

@JeewoongKim

@JeewoongKim JeewoongKim commented Oct 8, 2026 •

Copy link
Copy Markdown

The ARMv7-A assembly reads TX_THREAD fields 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.

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
fdesbiens self-requested a review October 16, 2026 13:35
@fdesbiens fdesbiens self-assigned this Oct 16, 2026

@fdesbiens fdesbiens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@JeewoongKim

Copy link
Copy Markdown
Author

Thanks for the review! I've removed the AI-process paragraphs from the PR description.

For the Assisted-by trailer, I found noreply@openai.com used for Codex attribution in OpenAI's repository,
but couldn't find an official email address for ChatGPT. Since I used ChatGPT rather than Codex,
would Assisted-by: ChatGPT (GPT-5.6 Sol) <noreply@openai.com> be acceptable, or is there a preferred address?

@JeewoongKim

Copy link
Copy Markdown
Author

Hi @fdesbiens , just following up 👆

@JeewoongKim
JeewoongKim requested a review from fdesbiens November 6, 2026 07:40
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>
@fdesbiens
fdesbiens force-pushed the fix/armv7a-gnu-offset-check branch from 3266793 to 2d0bede Compare November 24, 2026 21:16

@fdesbiens fdesbiens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@fdesbiens
fdesbiens merged commit 03eeb65 into eclipse-threadx:dev Nov 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants