Skip to content

Incompatibility in Inline TLS Assembly on Alpine 3.22 with zend_jit_ir.c #18743

Open
@thecaliskan

Description

@thecaliskan

Description

When building PHP on Alpine Linux 3.22 with musl and targeting 32-bit or 64-bit x86 platforms, a regression is observed related to inline assembly in ext/opcache/jit/zend_jit_ir.c, specifically:

This error does not occur on Alpine 3.21 using the same compilation toolchain. The issue stems from the @TLSGD usage which implicitly expects %rdi on x86_64 or %eax on i386, depending on the TLS model.

ext/opcache/jit/zend_jit_ir.c:3459: Error: @TLSGD operator requires %rdi' as dest register`

Environment

  • Alpine Linux 3.22
  • GCC (via build-base)
  • musl libc
  • Target: x86_64 or i386
  • Affected file: ext/opcache/jit/zend_jit_ir.c

Related PR / Reference

PHP Version

8.4.7-zts
8.3.21-zts
8.2.28-zts
8.1.32-zts

Operating System

Alpine 3.22

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions