Skip to content

Commit

Permalink
Merge tag 'php-8.3.15' into was-8.3.x
Browse files Browse the repository at this point in the history
Tag for php-8.3.15
  • Loading branch information
MaxKellermann committed Jan 7, 2025
2 parents e5e075c + b611b97 commit 04db9e1
Show file tree
Hide file tree
Showing 112 changed files with 1,912 additions and 430 deletions.
30 changes: 0 additions & 30 deletions .cirrus.yml

This file was deleted.

5 changes: 3 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,16 @@
/ext/json @bukka
/ext/libxml @nielsdos
/ext/mbstring @alexdowad @youkidearitai
/ext/mysqlnd @SakiTakamachi
/ext/mysqli @bukka @kamil-tekiela
/ext/mysqlnd @bukka @kamil-tekiela @SakiTakamachi
/ext/odbc @NattyNarwhal
/ext/opcache @dstogov
/ext/openssl @bukka
/ext/pcntl @devnexen
/ext/pdo @SakiTakamachi
/ext/pdo_dblib @SakiTakamachi
/ext/pdo_firebird @SakiTakamachi
/ext/pdo_mysql @SakiTakamachi
/ext/pdo_mysql @kamil-tekiela @SakiTakamachi
/ext/pdo_odbc @NattyNarwhal @SakiTakamachi
/ext/pdo_pgsql @devnexen @SakiTakamachi
/ext/pdo_sqlite @SakiTakamachi
Expand Down
104 changes: 104 additions & 0 deletions .github/actions/freebsd/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: FreeBSD
runs:
using: composite
steps:
- name: FreeBSD
uses: vmactions/freebsd-vm@v1
with:
release: '13.3'
usesh: true
copyback: false
# Temporarily disable sqlite, as FreeBSD ships it with disabled double quotes. We'll need to fix our tests.
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269889
prepare: |
cd $GITHUB_WORKSPACE
kldload accf_http
pkg install -y \
autoconf \
bison \
gmake \
re2c \
icu \
libiconv \
png \
freetype2 \
enchant2 \
bzip2 \
t1lib \
gmp \
tidyp \
libsodium \
libzip \
libxml2 \
libxslt \
openssl \
oniguruma \
pkgconf \
webp \
libavif \
`#sqlite3` \
curl
./buildconf -f
./configure \
--prefix=/usr/local \
--enable-debug \
--enable-option-checking=fatal \
--enable-fpm \
`#--with-pdo-sqlite` \
--without-sqlite3 \
--without-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-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
gmake -j2
mkdir /etc/php.d
gmake install > /dev/null
echo opcache.enable_cli=1 > /etc/php.d/opcache.ini
echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini
echo opcache.preload_user=root >> /etc/php.d/opcache.ini
run: |
cd $GITHUB_WORKSPACE
export SKIP_IO_CAPTURE_TESTS=1
export CI_NO_IPV6=1
export STACK_LIMIT_DEFAULTS_CHECK=1
sapi/cli/php run-tests.php \
-P -q -j2 \
-g FAIL,BORK,LEAK,XLEAK \
--no-progress \
--offline \
--show-diff \
--show-slow 1000 \
--set-timeout 120 \
-d zend_extension=opcache.so
12 changes: 12 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -814,12 +814,14 @@ jobs:
with:
withMysqli: ${{ inputs.libmysqlclient_with_mysqli }}
- name: Build mysql-8.4
if: ${{ !inputs.libmysqlclient_with_mysqli }}
uses: ./.github/actions/build-libmysqlclient
with:
configurationParameters: ${{ !inputs.libmysqlclient_with_mysqli && '--enable-werror' || '' }}
libmysql: mysql-8.4.0-linux-glibc2.28-x86_64.tar.xz
withMysqli: ${{ inputs.libmysqlclient_with_mysqli }}
- name: Test mysql-8.4
if: ${{ !inputs.libmysqlclient_with_mysqli }}
uses: ./.github/actions/test-libmysqlclient
with:
withMysqli: ${{ inputs.libmysqlclient_with_mysqli }}
Expand Down Expand Up @@ -979,3 +981,13 @@ jobs:
run: .github/scripts/windows/build.bat
- name: Test
run: .github/scripts/windows/test.bat
FREEBSD:
name: FREEBSD
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: FreeBSD
uses: ./.github/actions/freebsd
8 changes: 8 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -336,3 +336,11 @@ jobs:
${{ github.sha }} \
$(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.sha }}) \
> $GITHUB_STEP_SUMMARY
FREEBSD:
name: FREEBSD
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v4
- name: FreeBSD
uses: ./.github/actions/freebsd
9 changes: 7 additions & 2 deletions .github/workflows/root.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,17 @@ jobs:
matrix:
branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
with:
asan_ubuntu_version: '20.04'
asan_ubuntu_version: ${{
(((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 5) || matrix.branch.version[0] >= 9) && '24.04')
|| '20.04' }}
branch: ${{ matrix.branch.ref }}
community_verify_type_inference: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }}
libmysqlclient_with_mysqli: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1) }}
run_alpine: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }}
run_macos_arm64: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }}
ubuntu_version: ${{ ((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 3) || matrix.branch.version[0] >= 9) && '22.04' || '20.04' }}
ubuntu_version: ${{
(((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 5) || matrix.branch.version[0] >= 9) && '24.04')
|| ((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 3) && '22.04')
|| '20.04' }}
windows_version: ${{ ((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9) && '2022' || '2019' }}
secrets: inherit
93 changes: 92 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,6 +1,95 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
21 Nov 2024, PHP 8.3.14
19 Dec 2024, PHP 8.3.15

- Calendar:
. Fixed jdtogregorian overflow. (David Carlier)
. Fixed cal_to_jd julian_days argument overflow. (David Carlier)

- COM:
. Fixed bug GH-16991 (Getting typeinfo of non DISPATCH variant segfaults).
(cmb)

- Core:
. Fail early in *nix configuration build script. (hakre)
. Fixed bug GH-16727 (Opcache bad signal 139 crash in ZTS bookworm
(frankenphp)). (nielsdos)
. Fixed bug GH-16799 (Assertion failure at Zend/zend_vm_execute.h:7469).
(nielsdos)
. Fixed bug GH-16630 (UAF in lexer with encoding translation and heredocs).
(nielsdos)
. Fix is_zend_ptr() huge block comparison. (nielsdos)
. Fixed potential OOB read in zend_dirname() on Windows. (cmb)

- Curl:
. Fixed bug GH-16802 (open_basedir bypass using curl extension). (nielsdos)
. Fix various memory leaks in curl mime handling. (nielsdos)

- DOM:
. Fixed bug GH-16777 (Calling the constructor again on a DOM object after it
is in a document causes UAF). (nielsdos)
. Fixed bug GH-16906 (Reloading document can cause UAF in iterator).
(nielsdos)

- FPM:
. Fixed GH-16432 (PHP-FPM 8.2 SIGSEGV in fpm_get_status). (Jakub Zelenka)

- GD:
. Fixed GH-16776 (imagecreatefromstring overflow). (David Carlier)

- GMP:
. Fixed bug GH-16890 (array_sum() with GMP can loose precision (LLP64)).
(cmb)

- Hash:
. Fixed GH-16711: Segfault in mhash(). (Girgias)

- Opcache:
. Fixed bug GH-16770 (Tracing JIT type mismatch when returning UNDEF).
(nielsdos, Dmitry)
. Fixed bug GH-16851 (JIT_G(enabled) not set correctly on other threads).
(dktapps)
. Fixed bug GH-16902 (Set of opcache tests fail zts+aarch64). (nielsdos)

- OpenSSL:
. Prevent unexpected array entry conversion when reading key. (nielsdos)
. Fix various memory leaks related to openssl exports. (nielsdos)
. Fix memory leak in php_openssl_pkey_from_zval(). (nielsdos)

- PDO:
. Fixed memory leak of `setFetchMode()`. (SakiTakamachi)

- Phar:
. Fixed bug GH-16695 (phar:// tar parser and zero-length file header blocks).
(nielsdos, Hans Krentel)

- PHPDBG:
. Fixed bug GH-15208 (Segfault with breakpoint map and phpdbg_clear()).
(nielsdos)

- SAPI:
. Fixed bug GH-16998 (UBSAN warning in rfc1867). (nielsdos)

- SimpleXML:
. Fixed bug GH-16808 (Segmentation fault in RecursiveIteratorIterator
->current() with a xml element input). (nielsdos)

- SOAP:
. Fix make check being invoked in ext/soap. (Ma27)

- Standard:
. Fixed bug GH-16905 (Internal iterator functions can't handle UNDEF
properties). (nielsdos)
. Fixed bug GH-16957 (Assertion failure in array_shift with
self-referencing array). (nielsdos)

- Streams:
. Fixed network connect poll interuption handling. (Jakub Zelenka)

- Windows:
. Fixed bug GH-16849 (Error dialog causes process to hang). (cmb)

07 Nov 2024, PHP 8.3.14RC1

- CLI:
. Fixed bug GH-16373 (Shebang is not skipped for router script in cli-server
Expand All @@ -22,6 +111,8 @@ PHP NEWS
. Fixed bug GH-16508 (Incorrect line number in inheritance errors of delayed
early bound classes). (ilutov)
. Fixed bug GH-16648 (Use-after-free during array sorting). (ilutov)
. Fixed bug GH-15915 (overflow with a high value for precision INI).
(David Carlier / cmb)

- Curl:
. Fixed bug GH-16302 (CurlMultiHandle holds a reference to CurlHandle if
Expand Down
19 changes: 19 additions & 0 deletions Zend/tests/gh16630.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--TEST--
GH-16630 (UAF in lexer with encoding translation and heredocs)
--EXTENSIONS--
mbstring
--INI--
zend.multibyte=On
zend.script_encoding=ISO-8859-1
internal_encoding=EUC-JP
--FILE--
<?php
$data3 = <<<CODE
heredoc
text
CODE;
echo $data3;
?>
--EXPECT--
heredoc
text
21 changes: 21 additions & 0 deletions Zend/tests/gh16799.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--TEST--
GH-16799 (Assertion failure at Zend/zend_vm_execute.h)
--FILE--
<?php
set_error_handler(function($_, $m) { throw new Exception($m); });
class Test {
static function test() {
call_user_func("static::ok");
}
static function ok() {
}
}
Test::test();
?>
--EXPECTF--
Fatal error: Uncaught Exception: Use of "static" in callables is deprecated in %s:%d
Stack trace:
#0 %s(%d): {closure}(%d, 'Use of "static"...', %s, %d)
#1 %s(%d): Test::test()
#2 {main}
thrown in %s on line %d
2 changes: 1 addition & 1 deletion Zend/zend.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#ifndef ZEND_H
#define ZEND_H

#define ZEND_VERSION "4.3.14"
#define ZEND_VERSION "4.3.15"

#define ZEND_ENGINE_3

Expand Down
4 changes: 2 additions & 2 deletions Zend/zend_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2486,8 +2486,8 @@ ZEND_API bool is_zend_ptr(const void *ptr)

zend_mm_huge_list *block = AG(mm_heap)->huge_list;
while (block) {
if (ptr >= (void*)block
&& ptr < (void*)((char*)block + block->size)) {
if (ptr >= block->ptr
&& ptr < (void*)((char*)block->ptr + block->size)) {
return 1;
}
block = block->next;
Expand Down
Loading

0 comments on commit 04db9e1

Please sign in to comment.