Skip to content

x86: fix far JMP and CALL immediate sizes - #3182

Merged
Rot127 merged 1 commit into
capstone-engine:nextfrom
reverseame:x86-far-jmp-call-imm
Nov 26, 2026
Merged

Rot127 merged 1 commit into
capstone-engine:nextfrom
reverseame:x86-far-jmp-call-imm

Conversation

@ricardojrdez

Copy link
Copy Markdown
Contributor

Your checklist for this pull request

  • I've documented or updated the documentation of every API function and struct this PR changes.
  • I've added tests that prove my fix is effective or that my feature works (if possible)

Detailed description

  • 66 ea 11 22 33 44 (32): far JMP with an operand-size prefix now
    reports imm_size 2 and a 2-byte offset, instead of an uninitialized
    imm_size and a 4-byte offset.

Test plan

Added 1 regression test in tests/details/x86.yaml to cover the fix. In addition, the existing lcall 0x5678, 0x1234 case is updated (immediate size 4 -> 2). They fail before the change.

@codecov

codecov Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (next@ccd25ab). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #3182   +/-   ##
=======================================
  Coverage        ?   61.89%           
=======================================
  Files           ?      243           
  Lines           ?    56920           
  Branches        ?    10123           
=======================================
  Hits            ?    35228           
  Misses          ?    16491           
  Partials        ?     5201           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- 66 ea 11 22 33 44 (32): far JMP with an operand-size prefix now
  reports imm_size 2 and a 2-byte offset, instead of an uninitialized
  imm_size and a 4-byte offset.
@github-actions github-actions Bot added the X86 Arch label Nov 24, 2026
@Rot127
Rot127 merged commit 2dd0215 into capstone-engine:next Nov 26, 2026
58 of 59 checks passed
@Rot127

Rot127 commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

X86 Arch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants