Skip to content

fix(native): name the unsupported Thumb mode for an odd raw ARM entry - #10683

Merged
morluto merged 1 commit into
morluto:mainfrom
Davmunrey:fix/arm-thumb-entry-hint
Nov 18, 2026
Merged

morluto merged 1 commit into
morluto:mainfrom
Davmunrey:fix/arm-thumb-entry-hint

Conversation

@Davmunrey

Copy link
Copy Markdown
Contributor

Summary

Refs #8210. open_binary with format: "raw-binary", architecture: "arm" and entry_point: "0x4001" is refused because the entry is not 4-byte aligned. The remediation only says to correct the load argument. An odd ARM address is how a Thumb function pointer is spelled, so the caller cannot tell that the real limit is the unsupported raw Thumb mode.

Change and scope

  • src/domain/rawBinary.ts: for an arm entry with bit 0 set, the refusal reason now ends with: "an odd address can be a Thumb function pointer with bit 0 set, but raw-binary arm decodes ARM state only, so a Thumb entry is unsupported and the entry was not adjusted."
  • The reason does not assume the caller's mode and does not change the entry, as the issue asks.
  • Entries with bit 0 clear that are still misaligned (for example 0x…2) keep the existing text. So do all arm64 entries, because AArch64 has no Thumb state.
  • Not included: raw Thumb support itself ([Design] Consider Kuna support for caller-described raw binaries #8175) and any automatic entry normalization.

Evidence and regression coverage

  • src/domain/rawBinary.test.ts: the existing unaligned-entry case now expects the note for odd arm entries only. It fails on the base (1 failed, 31 passed) and passes after the change (32 passed).

Validation performed

  • npm run test:local -- src/domain/rawBinary.test.ts: 32 passed.
  • npm run check:fast passed.

Author readiness

Human owner: @Davmunrey

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

A 32-bit ARM raw-binary entry such as 0x4001 was refused as not 4-byte
aligned, and the remediation only said to correct the load argument. An
odd ARM address is how a Thumb function pointer is spelled, so a caller
holding one could not tell that the real limit is the unsupported raw
Thumb mode rather than a typo.

For `arm` entries with bit 0 set, the refusal now adds that the address
can be a Thumb function pointer but raw-binary arm decodes ARM state
only, so a Thumb entry is unsupported and the entry was not adjusted. It
does not assume the caller's mode or change the entry. Even misaligned
ARM entries and all arm64 entries keep the existing text.

Validation: src/domain/rawBinary.test.ts fails on the base (the odd ARM
cases lack the note) and passes 32/32 after; check:fast passes.

Refs morluto#8210
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-14T23:23:52.872565Z
We couldn’t complete this review. Comment @codex review to try again.
5cd51ff PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@greptile-apps

greptile-apps Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This PR appears safe to merge.

Summary

Adds a Thumb explanation when admitRawBinary rejects an odd arm entry.

  • Odd raw ARM entries explain why Thumb mode is refused.

Reviews (1) · Last reviewed commit: "fix(native): name the unsupported Thumb ..." · Reviewed by Greptile

@Davmunrey

Copy link
Copy Markdown
Contributor Author

Ready to merge: full CI is green on this head, Greptile's latest review is 5/5 with no open threads, and it merges into main 42cab26 without conflicts.

@morluto
morluto merged commit 090c227 into morluto:main Nov 18, 2026
49 checks passed
Davmunrey added a commit to Davmunrey/Davmunrey that referenced this pull request Nov 18, 2026
@morluto morluto added area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior bug Something isn't working labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants