python / python/cpython

JIT arm64 relocations does not handles large addresses

Open
#147,805 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

interpreter-core performance topic-JIT type-feature
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

In https://github.com/python/cpython/pull/146906, the JIT inlines the address of the function pointer in operand0 however the arm64 relocation does not properly handles large addresses which needs a trampoline.
I think the fix is to generate trampoline for such cases if the address is too large.

Claude suggested the following fix which seems to work: https://gist.github.com/kumaraditya303/45ca837aa1367e65a3bfadca9fae039e

cc @markshannon

Linked PRs
  • gh-147941

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the JIT arm64 relocation changes from PR 146906 and compare them with the proposed fix in the linked gist. Check linked PR 147941 for the current work; done means large function-pointer addresses are relocated correctly, including cases requiring a trampoline.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.