Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: php/php-src
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5683708
Choose a base ref
...
head repository: arnaud-lb/php-src
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5ee6420
Choose a head ref
  • 11 commits
  • 40 files changed
  • 2 contributors

Commits on Jun 30, 2025

  1. Fix linker failure when building opcache statically

    This fixes the following linker error:
    
        TLS transition from R_X86_64_TLSGD to R_X86_64_GOTTPOFF against
        `_tsrm_ls_cache' at 0x12fc3 in section `.text' failed"
    
    The error arises from how we obtain information about the _tsrm_ls_cache TLS
    variable for use in JIT'ed code:
    
    Normally, TLS variables are resolved via linker relocations [1], which of course
    can not be used in JIT'ed code. Therefore we emit the relocation in AOT code and
    use the result in JIT.
    
    Specifically we use a fragment of the "General Dynamic" code sequence described
    in [1]. Using the full code sequence would give us the address of the variable
    in the current thread. Therefore we only use a fragment that gives us the
    variable's TLS index and offset.
    
    When Opcache is statically linked into the binary, linkers attempt to relax
    (rewrite) this code sequence into a more efficient one. However, this fails
    because they will not recognize the code sequence.
    
    We now take a different approach:
    
     * Emit the exact full code sequence expected by linkers
     * Extract the TLS index/offset or TCB offset by inspecting the ASM code, rather
       than executing it (execution would give us the thread-local address).
     * This is done in a conservative way so that if the linker did
       something we didn't expect, we fallback to a safer (but slower) mechanism.
    
    [1] https://www.akkadia.org/drepper/tls.pdf
    arnaud-lb committed Jun 30, 2025
    Configuration menu
    Copy the full SHA
    58144d2 View commit details
    Browse the repository at this point in the history
  2. WS

    arnaud-lb committed Jun 30, 2025
    Configuration menu
    Copy the full SHA
    b43e63b View commit details
    Browse the repository at this point in the history
  3. Fix

    arnaud-lb committed Jun 30, 2025
    Configuration menu
    Copy the full SHA
    d749db6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8623d4f View commit details
    Browse the repository at this point in the history
  5. Fix FreeBSD CI

    arnaud-lb committed Jun 30, 2025
    Configuration menu
    Copy the full SHA
    b192960 View commit details
    Browse the repository at this point in the history
  6. Make OPcache non-optional

    arnaud-lb committed Jun 30, 2025
    Configuration menu
    Copy the full SHA
    3ba008d View commit details
    Browse the repository at this point in the history
  7. Remove zend_extension=opcache

    TimWolla authored and arnaud-lb committed Jun 30, 2025
    Configuration menu
    Copy the full SHA
    1f585b2 View commit details
    Browse the repository at this point in the history
  8. Remove --enable-opcache

    TimWolla authored and arnaud-lb committed Jun 30, 2025
    Configuration menu
    Copy the full SHA
    1f03827 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    85bb568 View commit details
    Browse the repository at this point in the history
  10. Add explicit non-PIC test

    arnaud-lb committed Jun 30, 2025
    Configuration menu
    Copy the full SHA
    6e09776 View commit details
    Browse the repository at this point in the history
  11. Merge branch 'required-opcache' into static-opcache-tls-with-required…

    …-opcache
    
    * required-opcache:
      Fix expectations in version string tests
      Remove `--enable-opcache`
      Remove `zend_extension=opcache`
      Make OPcache non-optional
    arnaud-lb committed Jun 30, 2025
    Configuration menu
    Copy the full SHA
    5ee6420 View commit details
    Browse the repository at this point in the history
Loading