Skip to content

feat(opcache): macOS/arm64 support for the relocator (absolute-address oplines) #119

Closed

Description

@lisachenko

Follow-up to the OpCache binary-file API (#111, merged). Relates to #58 (macOS).

The relocator preserves oplines verbatim, relying on ZEND_USE_ABS_CONST_ADDR == 0 and ZEND_USE_ABS_JMP_ADDR == 0 (true on linux-x64: operands are literal indexes, jumps are relative). On builds where either is 1, zend_file_cache_(un)serialize_op_array relocates opline->op1/op2.zv and jmp_addr per-opline — the relocator must do the same there.

Scope: add the per-opline absolute-address relocation branches for macOS/arm64, gated on the platform, once #58 provides the base platform support. Track alongside that issue.

Windows is intentionally out of scope (rescoped 2026-08-19): full opcache support on Windows is a deliberate non-goal for z-engine. The relocator keeps rejecting Windows loudly (PayloadRelocator constructor throws OpCacheException::unsupportedPayload), and the docs record it as an intentional limitation rather than pending work. The original Windows half of this ticket (per-opline absolute-address branches for the Windows build plus the Windows zend_file_cache_get_bin_file_path layout) is preserved here for reference in case that policy ever changes, but no Windows relocator work is planned.

Activity

  1. added
    enhancementNew feature or request
    opcacheIssue is related to opcache integration. Either doesn't work well or behaves incorrect.
    on Aug 5, 2026
  2. changed the title [-]feat(opcache): macOS/arm64 & Windows support for the relocator (absolute-address oplines)[/-] [+]feat(opcache): macOS/arm64 support for the relocator (absolute-address oplines)[/+] on Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestopcacheIssue is related to opcache integration. Either doesn't work well or behaves incorrect.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions