Skip to content

Commit 06b0248

Browse files
committed
Merge tag 'php-8.4.4' into was-8.4.x
Tag for php-8.4.4
2 parents 5b4e67a + 3786cff commit 06b0248

File tree

135 files changed

+3955
-1751
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+3955
-1751
lines changed

.github/actions/setup-windows/action.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ runs:
33
using: composite
44
steps:
55
- name: Setup MySQL
6-
shell: pwsh
6+
shell: cmd
77
run: |
8-
choco install mysql -y --no-progress --params="/port:3306"
9-
mysql.exe --port=3306 --user=root --password="" -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'Password12!'; FLUSH PRIVILEGES;"
8+
mysqld --initialize-insecure
9+
mysqld --install
10+
net start MySQL
11+
mysql --port=3306 --user=root --password="" -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'Password12!'; FLUSH PRIVILEGES;"
1012
- name: Setup MSSQL
1113
shell: pwsh
1214
run: |

.github/scripts/windows/test_task.bat

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,9 @@ rem generate php.ini
125125
echo extension_dir=%PHP_BUILD_DIR% > %PHP_BUILD_DIR%\php.ini
126126
echo opcache.file_cache=%PHP_BUILD_DIR%\test_file_cache >> %PHP_BUILD_DIR%\php.ini
127127
if "%OPCACHE%" equ "1" echo zend_extension=php_opcache.dll >> %PHP_BUILD_DIR%\php.ini
128-
rem work-around for some spawned PHP processes requiring OpenSSL
128+
rem work-around for some spawned PHP processes requiring OpenSSL and sockets
129129
echo extension=php_openssl.dll >> %PHP_BUILD_DIR%\php.ini
130+
echo extension=php_sockets.dll >> %PHP_BUILD_DIR%\php.ini
130131

131132
rem remove ext dlls for which tests are not supported
132133
for %%i in (ldap) do (

.github/workflows/nightly.yml

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ on:
2626
windows_version:
2727
required: true
2828
type: string
29+
skip_symfony:
30+
required: true
31+
type: boolean
32+
skip_wordpress:
33+
required: true
34+
type: boolean
2935
permissions:
3036
contents: read
3137
jobs:
@@ -227,6 +233,8 @@ jobs:
227233
runs-on: ubuntu-latest
228234
container:
229235
image: ubuntu:${{ inputs.ubuntu_version }}
236+
env:
237+
PDO_FIREBIRD_TEST_DSN: firebird:dbname=firebird:test.fdb
230238
services:
231239
mysql:
232240
image: mysql:8.3
@@ -235,6 +243,15 @@ jobs:
235243
env:
236244
MYSQL_DATABASE: test
237245
MYSQL_ROOT_PASSWORD: root
246+
firebird:
247+
image: jacobalberty/firebird
248+
ports:
249+
- 3050:3050
250+
env:
251+
ISC_PASSWORD: test
252+
FIREBIRD_DATABASE: test.fdb
253+
FIREBIRD_USER: test
254+
FIREBIRD_PASSWORD: test
238255
steps:
239256
- name: git checkout
240257
uses: actions/checkout@v4
@@ -410,7 +427,7 @@ jobs:
410427
-d zend_extension=opcache.so
411428
-d opcache.enable_cli=1
412429
- uses: codecov/codecov-action@v4
413-
if: always()
430+
if: ${{ !cancelled() }}
414431
with:
415432
fail_ci_if_error: true
416433
token: ${{ secrets.CODECOV_TOKEN }}
@@ -483,7 +500,7 @@ jobs:
483500
echo opcache.jit_hot_side_exit=1 >> /etc/php.d/opcache.ini
484501
php -v
485502
- name: Test AMPHP
486-
if: always()
503+
if: ${{ !cancelled() }}
487504
run: |
488505
repositories="amp cache dns file http parallel parser pipeline process serialization socket sync websocket-client websocket-server"
489506
X=0
@@ -501,7 +518,7 @@ jobs:
501518
done
502519
exit $X
503520
- name: Test Laravel
504-
if: always()
521+
if: ${{ !cancelled() }}
505522
run: |
506523
git clone https://github.com/laravel/framework.git --branch=master --depth=1
507524
cd framework
@@ -514,7 +531,7 @@ jobs:
514531
exit 1
515532
fi
516533
- name: Test ReactPHP
517-
if: always()
534+
if: ${{ !cancelled() }}
518535
run: |
519536
repositories="async cache child-process datagram dns event-loop promise promise-stream promise-timer stream"
520537
X=0
@@ -532,7 +549,7 @@ jobs:
532549
done
533550
exit $X
534551
- name: Test Revolt PHP
535-
if: always()
552+
if: ${{ !cancelled() }}
536553
run: |
537554
git clone https://github.com/revoltphp/event-loop.git --depth=1
538555
cd event-loop
@@ -543,7 +560,7 @@ jobs:
543560
exit 1
544561
fi
545562
- name: Test Symfony
546-
if: always()
563+
if: ${{ !cancelled() && !inputs.skip_symfony }}
547564
run: |
548565
git clone https://github.com/symfony/symfony.git --depth=1
549566
cd symfony
@@ -564,7 +581,7 @@ jobs:
564581
done
565582
exit $X
566583
- name: Test PHPUnit
567-
if: always()
584+
if: ${{ !cancelled() }}
568585
run: |
569586
git clone https://github.com/sebastianbergmann/phpunit.git --branch=main --depth=1
570587
cd phpunit
@@ -575,15 +592,15 @@ jobs:
575592
exit 1
576593
fi
577594
- name: 'Symfony Preloading'
578-
if: always()
595+
if: ${{ !cancelled() && !inputs.skip_symfony }}
579596
run: |
580597
php /usr/bin/composer create-project symfony/symfony-demo symfony_demo --no-progress --ignore-platform-reqs
581598
cd symfony_demo
582599
git rev-parse HEAD
583600
sed -i 's/PHP_SAPI/"cli-server"/g' var/cache/dev/App_KernelDevDebugContainer.preload.php
584601
php -d opcache.preload=var/cache/dev/App_KernelDevDebugContainer.preload.php public/index.php
585602
- name: Test Wordpress
586-
if: always()
603+
if: ${{ !cancelled() && !inputs.skip_wordpress }}
587604
run: |
588605
git clone https://github.com/WordPress/wordpress-develop.git wordpress --depth=1
589606
cd wordpress
@@ -952,10 +969,18 @@ jobs:
952969
- x64: true
953970
zts: true
954971
opcache: true
972+
asan: false
955973
- x64: false
956974
zts: false
957975
opcache: false
958-
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
976+
asan: false
977+
- x64: true
978+
zts: true
979+
opcache: true
980+
asan: true
981+
branch: 'master'
982+
timeout: 120
983+
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || ''}}"
959984
runs-on: windows-${{ inputs.windows_version }}
960985
env:
961986
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
@@ -968,6 +993,7 @@ jobs:
968993
INTRINSICS: "${{ matrix.zts && 'AVX2' || '' }}"
969994
PARALLEL: -j2
970995
OPCACHE: "${{ matrix.opcache && '1' || '0' }}"
996+
ASAN: "${{ matrix.asan && '1' || '0' }}"
971997
steps:
972998
- name: git config
973999
run: git config --global core.autocrlf false && git config --global core.eol lf

.github/workflows/root.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,6 @@ jobs:
5959
|| ((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 3) && '22.04')
6060
|| '20.04' }}
6161
windows_version: ${{ ((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9) && '2022' || '2019' }}
62+
skip_symfony: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
63+
skip_wordpress: ${{ matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1 }}
6264
secrets: inherit

NEWS

Lines changed: 120 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,125 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3-
16 Jan 2025, PHP 8.4.3
3+
13 Feb 2025, PHP 8.4.4
4+
5+
- Core:
6+
. Fixed bug GH-17234 (Numeric parent hook call fails with assertion).
7+
(nielsdos)
8+
. Fixed bug GH-16892 (ini_parse_quantity() fails to parse inputs starting
9+
with 0x0b). (nielsdos)
10+
. Fixed bug GH-16886 (ini_parse_quantity() fails to emit warning for 0x+0).
11+
(nielsdos)
12+
. Fixed bug GH-17222 (__PROPERTY__ magic constant does not work in all
13+
constant expression contexts). (ilutov)
14+
. Fixed bug GH-17214 (Relax final+private warning for trait methods with
15+
inherited final). (ilutov)
16+
. Fixed NULL arithmetic during system program execution on Windows. (cmb,
17+
nielsdos)
18+
. Fixed potential OOB when checking for trailing spaces on Windows. (cmb)
19+
. Fixed bug GH-17408 (Assertion failure Zend/zend_exceptions.c).
20+
(nielsdos, ilutov)
21+
. Fix may_have_extra_named_args flag for ZEND_AST_UNPACK. (nielsdos)
22+
. Fix NULL arithmetic in System V shared memory emulation for Windows. (cmb)
23+
. Fixed bug GH-17597 (#[\Deprecated] does not work for __call() and
24+
__callStatic()). (timwolla)
25+
26+
- DOM:
27+
. Fixed bug GH-17397 (Assertion failure ext/dom/php_dom.c). (nielsdos)
28+
. Fixed bug GH-17486 (Incorrect error line numbers reported in
29+
Dom\HTMLDocument::createFromString). (nielsdos)
30+
. Fixed bug GH-17481 (UTF-8 corruption in \Dom\HTMLDocument). (nielsdos)
31+
. Fixed bug GH-17500 (Segfault with requesting nodeName on nameless doctype).
32+
(nielsdos)
33+
. Fixed bug GH-17485 (upstream fix, Self-closing tag on void elements
34+
shouldn't be a parse error/warning in \Dom\HTMLDocument). (lexborisov)
35+
. Fixed bug GH-17572 (getElementsByTagName returns collections with
36+
tagName-based indexing). (nielsdos)
37+
38+
- Enchant:
39+
. Fix crashes in enchant when passing null bytes. (nielsdos)
40+
41+
- FTP:
42+
. Fixed bug GH-16800 (ftp functions can abort with EINTR). (nielsdos)
43+
44+
- GD:
45+
. Fixed bug GH-17349 (Tiled truecolor filling looses single color
46+
transparency). (cmb)
47+
. Fixed bug GH-17373 (imagefttext() ignores clipping rect for palette
48+
images). (cmb)
49+
. Ported fix for libgd 223 (gdImageRotateGeneric() does not properly
50+
interpolate). (cmb)
51+
. Added support for reading GIFs without colormap to bundled libgd. (Andrew
52+
Burley, cmb)
53+
54+
- Gettext:
55+
. Fixed bug GH-17400 (bindtextdomain SEGV on invalid domain).
56+
(David Carlier)
57+
58+
- Intl:
59+
. Fixed bug GH-11874 (intl causing segfault in docker images). (nielsdos)
60+
61+
- Opcache:
62+
. Fixed bug GH-15981 (Segfault with frameless jumps and minimal JIT).
63+
(nielsdos)
64+
. Fixed bug GH-17307 (Internal closure causes JIT failure). (nielsdos)
65+
. Fixed bug GH-17428 (Assertion failure ext/opcache/jit/zend_jit_ir.c:8940).
66+
(nielsdos)
67+
. Fixed bug GH-17564 (Potential UB when reading from / writing to struct
68+
padding). (ilutov)
69+
70+
- PCNTL:
71+
. Fixed pcntl_setcpuaffinity exception type from ValueError to TypeError for
72+
the cpu mask argument with entries type different than int/string.
73+
(David Carlier)
74+
75+
- PCRE:
76+
. Fixed bug GH-17122 (memory leak in regex). (nielsdos)
77+
78+
- PDO:
79+
. Fixed a memory leak when the GC is used to free a PDOStatment. (Girgias)
80+
. Fixed a crash in the PDO Firebird Statement destructor. (nielsdos)
81+
. Fixed UAFs when changing default fetch class ctor args. (Girgias, nielsdos)
82+
83+
- PgSql:
84+
. Fixed build failure when the constant PGRES_TUPLES_CHUNK is not present
85+
in the system. (chschneider)
86+
87+
- Phar:
88+
. Fixed bug GH-17518 (offset overflow phar extractTo()). (nielsdos)
89+
90+
- PHPDBG:
91+
. Fix crashes in function registration + test. (nielsdos, Girgias)
92+
93+
- Session:
94+
. Fix type confusion with session SID constant. (nielsdos)
95+
. Fixed bug GH-17541 (ext/session NULL pointer dereferencement during
96+
ID reset). (Girgias)
97+
98+
- SimpleXML:
99+
. Fixed bug GH-17409 (Assertion failure Zend/zend_hash.c:1730). (nielsdos)
100+
101+
- SNMP:
102+
. Fixed bug GH-17330 (SNMP::setSecurity segfault on closed session).
103+
(David Carlier)
104+
105+
- SPL:
106+
. Fixed bug GH-15833 (Segmentation fault (access null pointer) in
107+
ext/spl/spl_array.c). (nielsdos)
108+
. Fixed bug GH-17516 (SplFileTempObject::getPathInfo() Undefined behavior
109+
on invalid class). (David Carlier)
110+
111+
- Standard:
112+
. Fixed bug GH-17447 (Assertion failure when array popping a self addressing
113+
variable). (nielsdos)
114+
115+
- Windows:
116+
. Fixed clang compiler detection. (cmb)
117+
118+
- Zip:
119+
. Fixed bug GH-17139 (Fix zip_entry_name() crash on invalid entry).
120+
(nielsdos)
121+
122+
02 Jan 2025, PHP 8.4.3
4123

5124
- BcMath:
6125
. Fixed bug GH-17049 (Correctly compare 0 and -0). (Saki Takamachi)

TSRM/tsrm_win32.c

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -374,14 +374,16 @@ static process_pair *process_get(FILE *stream)
374374
process_pair *ptr;
375375
process_pair *newptr;
376376

377-
for (ptr = TWG(process); ptr < (TWG(process) + TWG(process_size)); ptr++) {
378-
if (ptr->stream == stream) {
379-
break;
377+
if (TWG(process) != NULL) {
378+
for (ptr = TWG(process); ptr < (TWG(process) + TWG(process_size)); ptr++) {
379+
if (ptr->stream == stream) {
380+
break;
381+
}
380382
}
381-
}
382383

383-
if (ptr < (TWG(process) + TWG(process_size))) {
384-
return ptr;
384+
if (ptr < (TWG(process) + TWG(process_size))) {
385+
return ptr;
386+
}
385387
}
386388

387389
newptr = (process_pair*)realloc((void*)TWG(process), (TWG(process_size)+1)*sizeof(process_pair));
@@ -400,19 +402,21 @@ static shm_pair *shm_get(key_t key, void *addr)
400402
shm_pair *ptr;
401403
shm_pair *newptr;
402404

403-
for (ptr = TWG(shm); ptr < (TWG(shm) + TWG(shm_size)); ptr++) {
404-
if (!ptr->descriptor) {
405-
continue;
406-
}
407-
if (!addr && ptr->descriptor->shm_perm.key == key) {
408-
break;
409-
} else if (ptr->addr == addr) {
410-
break;
405+
if (TWG(shm) != NULL) {
406+
for (ptr = TWG(shm); ptr < (TWG(shm) + TWG(shm_size)); ptr++) {
407+
if (!ptr->descriptor) {
408+
continue;
409+
}
410+
if (!addr && ptr->descriptor->shm_perm.key == key) {
411+
break;
412+
} else if (ptr->addr == addr) {
413+
break;
414+
}
411415
}
412-
}
413416

414-
if (ptr < (TWG(shm) + TWG(shm_size))) {
415-
return ptr;
417+
if (ptr < (TWG(shm) + TWG(shm_size))) {
418+
return ptr;
419+
}
416420
}
417421

418422
newptr = (shm_pair*)realloc((void*)TWG(shm), (TWG(shm_size)+1)*sizeof(shm_pair));
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
--TEST--
2+
#[\Deprecated]: __call() and __callStatic()
3+
--FILE--
4+
<?php
5+
6+
class Clazz {
7+
#[\Deprecated]
8+
function __call(string $name, array $params) {
9+
}
10+
11+
#[\Deprecated("due to some reason")]
12+
static function __callStatic(string $name, array $params) {
13+
}
14+
}
15+
16+
$cls = new Clazz();
17+
$cls->test();
18+
Clazz::test2();
19+
20+
?>
21+
--EXPECTF--
22+
Deprecated: Method Clazz::test() is deprecated in %s
23+
24+
Deprecated: Method Clazz::test2() is deprecated, due to some reason in %s on line %d

0 commit comments

Comments
 (0)