Skip to content

Commit 282a133

Browse files
committed
Merge tag 'php-8.2.18' into was-8.2.x
Tag for php-8.2.18
2 parents 6111a93 + d94fdf5 commit 282a133

File tree

109 files changed

+1860
-759
lines changed

Some content is hidden

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

109 files changed

+1860
-759
lines changed

.cirrus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ env:
44
freebsd_task:
55
name: FREEBSD_DEBUG_NTS
66
freebsd_instance:
7-
image_family: freebsd-13-2
7+
image_family: freebsd-13-3
88
env:
99
ARCH: amd64
1010
install_script:
@@ -14,7 +14,7 @@ freebsd_task:
1414
- pkg install -y autoconf bison gmake re2c icu libiconv png freetype2 enchant2 bzip2 krb5 t1lib gmp tidyp libsodium libzip libxml2 libxslt openssl oniguruma pkgconf webp libavif
1515
script:
1616
- ./buildconf -f
17-
- ./configure --prefix=/usr/local --enable-debug --enable-option-checking=fatal --enable-fpm --with-pdo-sqlite --without-pear --with-bz2 --with-avif --with-jpeg --with-webp --with-freetype --enable-gd --enable-exif --with-zip --with-zlib --enable-soap --enable-xmlreader --with-xsl --with-libxml --enable-shmop --enable-pcntl --enable-mbstring --with-curl --enable-sockets --with-openssl --with-iconv=/usr/local --enable-bcmath --enable-calendar --enable-ftp --with-kerberos --with-ffi --enable-zend-test --enable-dl-test=shared --enable-intl --with-mhash --with-sodium --enable-werror --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d
17+
- ./configure --prefix=/usr/local --enable-debug --enable-option-checking=fatal --enable-fpm --with-pdo-sqlite --without-pear --with-bz2 --with-avif --with-jpeg --with-webp --with-freetype --enable-gd --enable-exif --with-zip --with-zlib --enable-soap --enable-xmlreader --with-xsl --with-libxml --enable-shmop --enable-pcntl --enable-mbstring --with-curl --enable-sockets --with-openssl --with-iconv=/usr/local --enable-bcmath --enable-calendar --enable-ftp --with-kerberos --with-ffi --enable-zend-test --enable-dl-test=shared --enable-intl --with-mhash --with-sodium --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d
1818
- gmake -j2
1919
- mkdir /etc/php.d
2020
- gmake install

.github/CODEOWNERS

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# The following volunteers have self-identified as subject matter experts
2+
# or interested parties over a particular area of the php-src source code.
3+
# While requesting a review from someone does not obligate that person to
4+
# review a pull request, these reviewers might have valuable knowledge of
5+
# the problem area and could aid in deciding whether a pull request is ready
6+
# for merging.
7+
#
8+
# For more information, see the GitHub CODEOWNERS documentation:
9+
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
10+
11+
/.github @iluuu1994 @TimWolla
12+
/build/gen_stub.php @kocsismate
13+
/ext/bcmath @Girgias
14+
/ext/curl @adoy
15+
/ext/date @derickr
16+
/ext/dba @Girgias
17+
/ext/dom @nielsdos
18+
/ext/ffi @dstogov
19+
/ext/gettext @devnexen
20+
/ext/gmp @Girgias
21+
/ext/imap @Girgias
22+
/ext/intl @devnexen
23+
/ext/json @bukka
24+
/ext/libxml @nielsdos
25+
/ext/mbstring @alexdowad
26+
/ext/odbc @NattyNarwhal
27+
/ext/opcache @dstogov @iluuu1994
28+
/ext/openssl @bukka
29+
/ext/pdo_odbc @NattyNarwhal
30+
/ext/pdo_pgsql @devnexen
31+
/ext/pgsql @devnexen
32+
/ext/random @TimWolla @zeriyoshi
33+
/ext/session @Girgias
34+
/ext/sockets @devnexen
35+
/ext/spl @Girgias
36+
/ext/standard @bukka
37+
/ext/xmlreader @nielsdos
38+
/ext/xsl @nielsdos
39+
/main @bukka
40+
/sapi/fpm @bukka
41+
/Zend @iluuu1994
42+
/Zend/Optimizer @dstogov
43+
/Zend/zend.* @dstogov
44+
/Zend/zend_alloc.* @dstogov
45+
/Zend/zend_API.* @dstogov
46+
/Zend/zend_call_stack.* @arnaud-lb
47+
/Zend/zend_closures.* @dstogov
48+
/Zend/zend_execute.* @dstogov
49+
/Zend/zend_execute_API.c @dstogov
50+
/Zend/zend_gc.* @dstogov @arnaud-lb
51+
/Zend/zend_hash.* @dstogov
52+
/Zend/zend_inheritance.* @dstogov
53+
/Zend/zend_max_execution_timer.* @arnaud-lb
54+
/Zend/zend_object_handlers.* @dstogov
55+
/Zend/zend_objects.* @dstogov
56+
/Zend/zend_objects_API.* @dstogov
57+
/Zend/zend_opcode.* @dstogov
58+
/Zend/zend_string.* @dstogov
59+
/Zend/zend_type*.h @dstogov
60+
/Zend/zend_variables.* @dstogov
61+
/Zend/zend_vm* @dstogov
62+
*.stub.php @kocsismate

.github/actions/brew/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ runs:
55
- shell: bash
66
run: |
77
set -x
8+
9+
# Patch brew to overwrite always
10+
formula_installer="$(brew --repo)"/Library/Homebrew/formula_installer.rb
11+
code=" keg.link\(verbose: verbose\?"
12+
sudo sed -Ei '' "s/$code.*/$code, overwrite: true\)/" "$formula_installer"
13+
814
brew install \
915
pkg-config \
1016
autoconf \

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ runs:
1010
gh release -R caddyserver/caddy download --pattern 'caddy_*_linux_amd64.tar.gz' -O - | sudo tar -xz -C /usr/bin caddy
1111
sudo chmod +x /usr/bin/caddy
1212
sudo caddy start --config ext/curl/tests/Caddyfile
13+
continue-on-error: true

.github/actions/test-libmysqlclient/action.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ runs:
1414
export PDO_MYSQL_TEST_HOST=127.0.0.1
1515
export PDO_MYSQL_TEST_USER=root
1616
export PDO_MYSQL_TEST_PASS=root
17-
export REPORT_EXIT_STATUS=no
1817
sapi/cli/php run-tests.php -P -q \
1918
-g FAIL,BORK,LEAK,XLEAK \
2019
--no-progress --offline --show-diff --show-slow 1000 --set-timeout 120 \

NEWS

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,78 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3+
11 Apr 2024, PHP 8.2.18
4+
5+
- Core:
6+
. Fixed bug GH-13612 (Corrupted memory in destructor with weak references).
7+
(nielsdos)
8+
. Fixed bug GH-13784 (AX_GCC_FUNC_ATTRIBUTE failure). (Remi)
9+
. Fixed bug GH-13670 (GC does not scale well with a lot of objects created in
10+
destructor). (Arnaud)
11+
12+
- DOM:
13+
. Add some missing ZPP checks. (nielsdos)
14+
. Fix potential memory leak in XPath evaluation results. (nielsdos)
15+
. Fix phpdoc for DOMDocument load methods. (VincentLanglet)
16+
17+
- FPM
18+
. Fix incorrect check in fpm_shm_free(). (nielsdos)
19+
20+
- GD:
21+
. Fixed bug GH-12019 (add GDLIB_CFLAGS in feature tests). (Michael Orlitzky)
22+
23+
- Gettext:
24+
. Fixed sigabrt raised with dcgettext/dcngettext calls with gettext 0.22.5
25+
with category set to LC_ALL. (David Carlier)
26+
27+
- MySQLnd:
28+
. Fix GH-13452 (Fixed handshake response [mysqlnd]). (Saki Takamachi)
29+
. Fix incorrect charset length in check_mb_eucjpms(). (nielsdos)
30+
31+
- Opcache:
32+
. Fixed GH-13508 (JITed QM_ASSIGN may be optimized out when op1 is null).
33+
(Arnaud, Dmitry)
34+
. Fixed GH-13712 (Segmentation fault for enabled observers when calling trait
35+
method of internal trait when opcache is loaded). (Bob)
36+
37+
- PDO:
38+
. Fix various PDORow bugs. (Girgias)
39+
40+
- Random:
41+
. Fixed bug GH-13544 (Pre-PHP 8.2 compatibility for mt_srand with unknown
42+
modes). (timwolla)
43+
. Fixed bug GH-13690 (Global Mt19937 is not properly reset in-between
44+
requests when MT_RAND_PHP is used). (timwolla)
45+
46+
- Session:
47+
. Fixed bug GH-13680 (Segfault with session_decode and compilation error).
48+
(nielsdos)
49+
50+
- Sockets:
51+
. Fixed bug GH-13604 (socket_getsockname returns random characters in the end
52+
of the socket name). (David Carlier)
53+
54+
- SPL:
55+
. Fixed bug GH-13531 (Unable to resize SplfixedArray after being unserialized
56+
in PHP 8.2.15). (nielsdos)
57+
. Fixed bug GH-13685 (Unexpected null pointer in zend_string.h). (nielsdos)
58+
59+
- Standard:
60+
. Fixed bug GH-11808 (Live filesystem modified by tests). (nielsdos)
61+
. Fixed GH-13402 (Added validation of `\n` in $additional_headers of mail()).
62+
(SakiTakamachi)
63+
. Fixed bug GH-13203 (file_put_contents fail on strings over 4GB on Windows).
64+
(divinity76)
65+
. Fixed bug GHSA-pc52-254m-w9w7 (Command injection via array-ish $command
66+
parameter of proc_open). (CVE-2024-1874) (Jakub Zelenka)
67+
. Fixed bug GHSA-wpj3-hf5j-x4v4 (__Host-/__Secure- cookie bypass due to
68+
partial CVE-2022-31629 fix). (CVE-2024-2756) (nielsdos)
69+
. Fixed bug GHSA-h746-cjrr-wfmr (password_verify can erroneously return true,
70+
opening ATO risk). (CVE-2024-3096) (Jakub Zelenka)
71+
72+
- XML:
73+
. Fixed bug GH-13517 (Multiple test failures when building with
74+
--with-expat). (nielsdos)
75+
376
14 Mar 2024, PHP 8.2.17
477

578
- Core:
@@ -97,6 +170,8 @@ PHP NEWS
97170
loading composer classmaps with more than 11k elements). (nielsdos)
98171
. Fixed bug GH-12966 (missing cross-compiling 3rd argument so Autoconf doesn't
99172
emit warnings). (Peter Kokot)
173+
. Fixed bug GH-13727 (missing void keyword for C generate code for feature test).
174+
(Peter Kokot/David Carlier)
100175

101176
- Cli:
102177
. Fix incorrect timeout in built-in web server when using router script and

TSRM/threads.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ void *thread_routine(void *data) {
7373
return data;
7474
}
7575
76-
int main() {
76+
int main(void) {
7777
pthread_t thd;
7878
pthread_mutexattr_t mattr;
7979
int data = 1;

UPGRADING

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,8 @@ PHP 8.2 UPGRADE NOTES
243243
objects.
244244
. mail() function reverts back to the mixed LF and CRLF new lines (behavior
245245
before PHP 8.0) if mail.mixed_lf_and_crlf INI is on.
246+
. When $additional_headers of mail() is an array, the same validation as
247+
`\r\n` is now applied to `\n` alone too.
246248

247249
- XML
248250
. xml_parser_set_option() now actually returns false when attempting to set a

Zend/Zend.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ typedef union _mm_align_test {
217217
#define ZEND_MM_ALIGNMENT (sizeof(mm_align_test))
218218
#endif
219219
220-
int main()
220+
int main(void)
221221
{
222222
size_t i = ZEND_MM_ALIGNMENT;
223223
int zeros = 0;

Zend/tests/gh13670_001.phpt

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
--TEST--
2+
GH-13670 001
3+
--SKIPIF--
4+
<?php
5+
// gc_threshold is global state
6+
if (getenv('SKIP_REPEAT')) die('skip Not repeatable');
7+
?>
8+
--FILE--
9+
<?php
10+
11+
register_shutdown_function(function () {
12+
global $shutdown;
13+
$shutdown = true;
14+
});
15+
16+
class Cycle {
17+
public $self;
18+
public function __construct() {
19+
$this->self = $this;
20+
}
21+
public function __destruct() {
22+
global $shutdown;
23+
if (!$shutdown) {
24+
new Cycle();
25+
}
26+
}
27+
}
28+
29+
$defaultThreshold = gc_status()['threshold'];
30+
for ($i = 0; $i < $defaultThreshold+1; $i++) {
31+
new Cycle();
32+
}
33+
34+
$objs = [];
35+
for ($i = 0; $i < 100; $i++) {
36+
$obj = new stdClass;
37+
$objs[] = $obj;
38+
}
39+
40+
$st = gc_status();
41+
42+
if ($st['runs'] > 10) {
43+
var_dump($st);
44+
}
45+
?>
46+
==DONE==
47+
--EXPECT--
48+
==DONE==

0 commit comments

Comments
 (0)