Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
359ad80
Fix race condition in zend_runtime_jit(), zend_jit_hot_func()
arnaud-lb Sep 26, 2025
294e408
Merge branch 'PHP-8.4' into PHP-8.5
arnaud-lb Oct 7, 2025
5c0a1ef
Merge branch 'PHP-8.5'
arnaud-lb Oct 7, 2025
66708de
Upgrade Alpine in nightly job
arnaud-lb Oct 2, 2025
a30c92c
Merge branch 'PHP-8.1' into PHP-8.2
arnaud-lb Oct 7, 2025
a6e8158
Merge branch 'PHP-8.2' into PHP-8.3
arnaud-lb Oct 7, 2025
d929f42
Merge branch 'PHP-8.3' into PHP-8.4
arnaud-lb Oct 7, 2025
e886159
Merge branch 'PHP-8.4' into PHP-8.5
arnaud-lb Oct 7, 2025
286ff6b
Merge branch 'PHP-8.5'
arnaud-lb Oct 7, 2025
93104e5
Upgrade Alpine in push job
arnaud-lb Oct 7, 2025
a463ede
Merge branch 'PHP-8.4' into PHP-8.5
arnaud-lb Oct 7, 2025
d8746b5
Merge branch 'PHP-8.5'
arnaud-lb Oct 7, 2025
1c8363d
Fix curl build failure on macOS+curl 8.16
ndossche Sep 12, 2025
da75e41
Fix curl 8.16.0 compilation with zts
iluuu1994 Sep 22, 2025
b810a23
Fix more curl 8.16 issues
iluuu1994 Sep 23, 2025
36859ad
Fix curl_setopt_ssl test for curl 8.16
bukka Oct 7, 2025
742b7d8
Update NEWS with info about curl 8.16 compat fixes
bukka Oct 7, 2025
810aed1
Merge branch 'PHP-8.1' into PHP-8.2
bukka Oct 7, 2025
201b358
Merge branch 'PHP-8.2' into PHP-8.3
bukka Oct 7, 2025
78a24ff
Update NEWS entry for curl 8.16 update
bukka Oct 7, 2025
5eb6a81
Merge branch 'PHP-8.3' into PHP-8.4
bukka Oct 7, 2025
11a0fdd
Merge branch 'PHP-8.4' into PHP-8.5
bukka Oct 7, 2025
a859ba3
Merge branch 'PHP-8.5'
bukka Oct 7, 2025
d2569c9
[ci skip] Update NEWS for PHP 8.5.0 RC2
edorian Oct 7, 2025
ef8dfe2
Merge branch 'PHP-8.5'
edorian Oct 7, 2025
91eb2a5
PHP-8.3 is now for PHP 8.3.28-dev
ericmann Oct 7, 2025
bb8aa35
Merge branch 'PHP-8.3' into PHP-8.4
ericmann Oct 7, 2025
0fc4de5
Merge branch 'PHP-8.4' into PHP-8.5
ericmann Oct 7, 2025
7338eca
Merge branch 'PHP-8.5'
ericmann Oct 7, 2025
9f55c1a
ensure test passes with prod config
remicollet Oct 7, 2025
5c2f629
Merge branch 'PHP-8.5'
remicollet Oct 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/actions/apk/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ runs:
set -x

OPCACHE_TLS_TESTS_DEPS="clang gcc binutils-gold lld"
# compiler-rt provides libclang_rt.asan-x86_64.a for clang20
# https://pkgs.alpinelinux.org/contents?file=libclang_rt.asan-x86_64.a&path=&name=&branch=v3.22
ASAN_DEPS="clang20 compiler-rt"

apk update -q
apk add \
Expand Down Expand Up @@ -52,8 +55,9 @@ runs:
net-snmp-dev \
openldap-dev \
unixodbc-dev \
postgresql14-dev \
postgresql-dev \
tzdata \
musl-locales \
musl-locales-lang \
$OPCACHE_TLS_TESTS_DEPS
$OPCACHE_TLS_TESTS_DEPS \
$ASAN_DEPS
13 changes: 4 additions & 9 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,16 @@ jobs:
ALPINE:
if: inputs.run_alpine
name: ALPINE_X64_ASAN_UBSAN_DEBUG_ZTS
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
container:
image: 'alpine:3.20.1'
image: 'alpine:3.22'
steps:
- name: git checkout
uses: actions/checkout@v5
with:
ref: ${{ inputs.branch }}
- name: apk
uses: ./.github/actions/apk
- name: LLVM 17 (ASAN-only)
# libclang_rt.asan-x86_64.a is provided by compiler-rt, and only for clang17:
# https://pkgs.alpinelinux.org/contents?file=libclang_rt.asan-x86_64.a&path=&name=&branch=v3.20
run: |
apk add clang17 compiler-rt
- name: System info
run: |
echo "::group::Show host CPU info"
Expand All @@ -122,8 +117,8 @@ jobs:
configurationParameters: >-
CFLAGS="-fsanitize=undefined,address -fno-sanitize=function -DZEND_TRACK_ARENA_ALLOC"
LDFLAGS="-fsanitize=undefined,address -fno-sanitize=function"
CC=clang-17
CXX=clang++-17
CC=clang-20
CXX=clang++-20
--enable-debug
--enable-zts
skipSlow: true # FIXME: This should likely include slow extensions
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,14 @@ jobs:
ALPINE:
if: github.repository == 'php/php-src' || github.event_name == 'pull_request'
name: ALPINE_X64_ASAN_UBSAN_DEBUG_ZTS
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
container:
image: 'alpine:3.20.1'
image: 'alpine:3.22'
steps:
- name: git checkout
uses: actions/checkout@v5
- name: apk
uses: ./.github/actions/apk
- name: LLVM 17 (ASAN-only)
# libclang_rt.asan-x86_64.a is provided by compiler-rt, and only for clang17:
# https://pkgs.alpinelinux.org/contents?file=libclang_rt.asan-x86_64.a&path=&name=&branch=v3.20
run: |
apk add clang17 compiler-rt
- name: System info
run: |
echo "::group::Show host CPU info"
Expand All @@ -62,8 +57,8 @@ jobs:
configurationParameters: >-
CFLAGS="-fsanitize=undefined,address -fno-sanitize=function -DZEND_TRACK_ARENA_ALLOC"
LDFLAGS="-fsanitize=undefined,address -fno-sanitize=function"
CC=clang-17
CXX=clang++-17
CC=clang-20
CXX=clang++-20
--enable-debug
--enable-zts
skipSlow: true # FIXME: This should likely include slow extensions
Expand Down
2 changes: 1 addition & 1 deletion Zend/Optimizer/zend_func_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#define ZEND_FUNC_JIT_ON_PROF_REQUEST (1<<14) /* used by JIT */
#define ZEND_FUNC_JIT_ON_HOT_COUNTERS (1<<15) /* used by JIT */
#define ZEND_FUNC_JIT_ON_HOT_TRACE (1<<16) /* used by JIT */

#define ZEND_FUNC_JITED (1<<17) /* used by JIT */

typedef struct _zend_func_info zend_func_info;
typedef struct _zend_call_info zend_call_info;
Expand Down
12 changes: 8 additions & 4 deletions ext/curl/tests/curl_setopt_ssl.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ if ($curl_version['version_number'] < 0x074700) {
--FILE--
<?php

function check_error(CurlHandle $ch) {
function check_error(CurlHandle $ch, $expected = null) {
if (curl_errno($ch) !== 0) {
echo "CURL ERROR: " . curl_errno($ch) . "\n";
$errno = curl_errno($ch);
if (!is_null($expected)) {
$errno = $errno == $expected ? 'EXPECTED' : "UNEXPECTED(A:$errno,E:$expected)";
}
echo "CURL ERROR: " . $errno . "\n";
}
}

Expand Down Expand Up @@ -109,7 +113,7 @@ try {

$response = curl_exec($ch);
check_response($response, $clientCertSubject);
check_error($ch);
check_error($ch, curl_version()['version_number'] < 0x081000 ? 58 : 43);
$ch = null;

echo "\n";
Expand Down Expand Up @@ -203,7 +207,7 @@ bool(true)
bool(true)
bool(true)
client cert subject not in response
CURL ERROR: 58
CURL ERROR: EXPECTED

case 4: client cert and key from file
bool(true)
Expand Down
10 changes: 7 additions & 3 deletions ext/opcache/jit/zend_jit.c
Original file line number Diff line number Diff line change
Expand Up @@ -3098,8 +3098,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV zend_runtime_jit(Z
bool do_bailout = 0;

zend_shared_alloc_lock();
jit_extension = (zend_jit_op_array_extension*)ZEND_FUNC_INFO(op_array);

if (ZEND_FUNC_INFO(op_array)) {
if (jit_extension && !(jit_extension->func_info.flags & ZEND_FUNC_JITED)) {

SHM_UNPROTECT();
zend_jit_unprotect();
Expand All @@ -3111,11 +3112,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV zend_runtime_jit(Z
opline++;
}
}
jit_extension = (zend_jit_op_array_extension*)ZEND_FUNC_INFO(op_array);
((zend_op*)opline)->handler = jit_extension->orig_handler;

/* perform real JIT for this function */
zend_real_jit_func(op_array, NULL, NULL, ZEND_JIT_ON_FIRST_EXEC);

jit_extension->func_info.flags |= ZEND_FUNC_JITED;
} zend_catch {
do_bailout = true;
} zend_end_try();
Expand Down Expand Up @@ -3182,7 +3184,7 @@ void ZEND_FASTCALL zend_jit_hot_func(zend_execute_data *execute_data, const zend
zend_shared_alloc_lock();
jit_extension = (zend_jit_op_array_hot_extension*)ZEND_FUNC_INFO(op_array);

if (jit_extension) {
if (jit_extension && !(jit_extension->func_info.flags & ZEND_FUNC_JITED)) {
SHM_UNPROTECT();
zend_jit_unprotect();

Expand All @@ -3195,6 +3197,8 @@ void ZEND_FASTCALL zend_jit_hot_func(zend_execute_data *execute_data, const zend

/* perform real JIT for this function */
zend_real_jit_func(op_array, NULL, opline, ZEND_JIT_ON_HOT_COUNTERS);

jit_extension->func_info.flags |= ZEND_FUNC_JITED;
} zend_catch {
do_bailout = 1;
} zend_end_try();
Expand Down
1 change: 1 addition & 0 deletions sapi/cgi/tests/auto_globals_no_jit.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
CGI with auto_globals_jit=0
--INI--
auto_globals_jit=0
variables_order="EGPCS"
--CGI--
--ENV--
FOO=BAR
Expand Down