1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Commit Graph

136066 Commits

Author SHA1 Message Date
Michael Voříšek
3b2f03d16c Sync all boost.context files with release 1.86.0
Closes GH-20375.
2025-11-06 22:56:51 +01:00
Niels Dossche
7c96263cee dom: Fix compile warning due to misplaced const cast 2025-11-06 22:42:03 +01:00
Niels Dossche
d3a4b4b09c Fix crashes when trying to instantiate uninstantiable classes via date static constructors
Closes GH-20361.
2025-11-06 21:21:24 +01:00
Ilija Tovilo
b8fbf20c3b Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Relax Zend/tests/concat_003.phpt
2025-11-06 14:18:33 +01:00
Ilija Tovilo
d03cf27afe Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Relax Zend/tests/concat_003.phpt
2025-11-06 14:18:27 +01:00
Ilija Tovilo
f4bd908259 [skip ci] Relax Zend/tests/concat_003.phpt
This test frequently fails in CI, where it took 1.3s, including a repeat due to
being marked as flaky. Bump this limit with a generous margin.
2025-11-06 14:15:56 +01:00
Arnaud Le Blanc
b062410d32 Remove CE cache from non-interned file cache strings
Strings loaded from the file cache can not have a CE cache, because their cache
slot is invalid. Remove the IS_STR_CLASS_NAME_MAP_PTR flag from these strings.
We can also avoid updating the str flags in SERIALIZE_STR(), since the same
updates must also be done in UNSERIALIZE_STR().

This was already done for interned strings, but not for non-interned ones.

Fixes GH-20329
Closes GH-20337
2025-11-06 11:20:17 +01:00
Niels Dossche
0584e59734 tidy: Harden against tidyNodeGetText() failure
Either the buffer size or the return value needs to be checked.
From a quick look into the tidy source code, this can't fail right now
for our use case in practice, but it might in the future.

Closes GH-20389.
2025-11-05 20:21:32 +01:00
Ilija Tovilo
51edaac9cf Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Skip fpm tests crashing lsan on GHA
2025-11-05 13:23:09 +01:00
Ilija Tovilo
b9eaee18e4 [skip ci] Skip fpm tests crashing lsan on GHA
> LeakSanitizer has encountered a fatal error.

This happens only on 8.2/8.3 for some reason. Don't merge for 8.4 for now, we
can do that later if it reoccurs.
2025-11-05 13:22:44 +01:00
Ilija Tovilo
4cfc729ac7 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Avoid potential network port conflict in tests
2025-11-05 12:34:14 +01:00
Ilija Tovilo
004a3985e7 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Avoid potential network port conflict in tests
2025-11-05 12:34:08 +01:00
Ilija Tovilo
c2f4508198 [skip ci] Avoid potential network port conflict in tests
These tests:

- ext/standard/tests/network/udp4loop.phpt
- ext/sockets/tests/socket_create_listen.phpt
- ext/sockets/tests/socket_create_listen-win32.phpt

all use port 31338. socket_create_listen.phpt and its win32 variant are mutually
exclusive, so they can't conflict. While udp4loop.phpt tries multiple ports, the
other tests do not. If udp4loop.phpt runs first and socket_create_listen.phpt
starts before it ends, the port is still blocked. Bump the start port for
udp4loop.phpt to avoid conflicts.
2025-11-05 12:29:31 +01:00
Niels Dossche
fcc159b4f6 Fix GH-20374: PHP with tidy and custom-tags
Both enums and integers map to TidyInteger, however, in the TidyInteger
case we always used zval_get_long(). So for a non-numeric string, this
would get turned into 0. 0 is the first enum value in that case, so the
wrong enum value could be selected.

To solve this, add special handling for strings and (stringable) objects
such that we can explicitly check for numeric strings, and if they're
not, handle them as normal strings instead of as 0.

Closes GH-20387.
2025-11-04 20:00:22 +01:00
Niels Dossche
04323955c1 pgsql: Fix memory leak when object init fails (#20387)
The return value is already overwritten by this point so we do have to
clean up the old return value (i.e. dataset) after all.
2025-11-04 19:59:38 +01:00
Jakub Zelenka
17f253a1f2 PHP-8.3 is now for PHP 8.3.29-dev 2025-11-04 15:13:43 +01:00
Niels Dossche
720e006982 random: Fix memory leak when serialization fails (#20383)
Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
2025-11-04 08:32:22 +01:00
Gina Peter Banyard
bf599d4059 Update NEWS for recent pgsql bugfix 2025-11-04 00:06:16 +00:00
Gina Peter Banyard
94dc6ae871 ext/pgsql: Fix segfaults when attempting to fetch row into a non-instantiable class name (#20180)
Also fix Windows CI with Postgres and CLEAN sections

---------

Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
2025-11-04 00:04:30 +00:00
David Carlier
55f7303d73 ext/zip: fix memory leak when encryption is passed as userland array option.
Similar issue fixed in GH-19936.

close GH-20363
2025-11-02 21:15:07 +00:00
Niels Dossche
be8c8a9d6b Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Update zlib test to use separate file for flock()
2025-11-01 09:30:04 +01:00
Niels Dossche
df423e4f08 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Update zlib test to use separate file for flock()
2025-11-01 09:29:55 +01:00
Niels Dossche
c3d6bf65d5 Update zlib test to use separate file for flock()
This should prevent the nightly failures that fail with permission
denied on platforms with mandatory locks.

Closes GH-20351.
2025-11-01 09:29:45 +01:00
Ilija Tovilo
5518165499 Fix EG(current_execute_data) introduced in 1292037
Fixes OSS-Fuzz #456317305
2025-10-31 17:34:25 +01:00
Niels Dossche
6fe40de6e3 Fix GH-20302: Freeing a phar alias may invalidate PharFileInfo objects
Closes GH-20345.
2025-10-31 08:04:25 +01:00
Niels Dossche
a585ace762 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [ci skip] Fix CODEOWNERS name
2025-10-30 19:12:39 +01:00
Niels Dossche
4098613012 [ci skip] Fix CODEOWNERS name 2025-10-30 19:11:57 +01:00
Calvin Buckley
d9bae1d1f5 Move iconv const check into autoconf (8.3) (#20247)
See GH-16847
2025-10-29 14:35:08 -03:00
Ilija Tovilo
76e26c6c3c Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Unparallelize imap
2025-10-28 00:49:32 +01:00
Ilija Tovilo
fc1bc9c695 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Unparallelize imap
2025-10-28 00:49:26 +01:00
Ilija Tovilo
20654ce4c9 [skip ci] Unparallelize imap
It's removed for PHP 8.4 anyway, and still regularly causes "Mailbox already
exists" errors despite the flaky flag.
2025-10-28 00:48:19 +01:00
David Carlier
3c063abba1 ext/gd: Fix GH-19955 unit test.
Adding guard for imagefttext() availability.

close GH-20309
2025-10-27 17:45:17 +00:00
Ilija Tovilo
12920370e1 Fix stale EG(opline_before_exception) pointer through eval
Fixes GH-20183
Closes GH-20184
2025-10-27 16:48:46 +01:00
Niels Dossche
8761c4e507 Fix GH-20240: FTP with SSL: ftp_fput(): Connection timed out on successful writes
Looking at the strace, the timeout is only 1s which may be too low
anyway for checking for a response, but some servers also don't end up
replying finally anyway and close the connection already.

`data_available` was originally used for non-blocking downloads/uploads
and then reused for the shutdown sequence, but its error handling was
never adjusted to be silent.

Closes GH-20294.
2025-10-26 23:38:09 +01:00
Niels Dossche
61b0d589d6 ftp: Fix weird typo (#20295)
* ftp: Fix weird typo

In 8827f8eca9 the async functions were
renamed to nb functions. So this was just a find+replace of async to nb.
The diff shows that "no asyncronous transfer to continue" was replaced
with "no nbronous transfer to continue". Makes no sense.

* Update ext/ftp/php_ftp.c

Co-authored-by: Jakub Zelenka <bukka@php.net>

---------

Co-authored-by: Jakub Zelenka <bukka@php.net>
2025-10-26 08:56:56 +01:00
Niels Dossche
ed9529a7d3 Make bug70417.phpt less flaky
Closes GH-20287.
2025-10-25 12:13:58 +02:00
Niels Dossche
58df9fcf98 Fix UAF in tidy when tidySetErrorBuffer() fails
We should not free `intern` as its stored in the object store as well,
so the object store will already free it, leading to a UAF when the
object store tries to read the object's fields.

Closes GH-20276.
2025-10-24 21:19:47 +02:00
Niels Dossche
c7fc819c2d Use MYSQL_TYPE constants instead of FIELD_TYPE
The FIELD_TYPE constants are for BC. The JSON/VECTOR types are not
defined in FIELD_TYPE for libmysqlclient.
MYSQL_TYPE is available since MYSQL 5.0.0, so switch to that.

Since MYSQL_TYPEs are enums and not defines, we need version checks
instead.
JSON was added in mysql 8.0.0 in mysql/mysql-server@c240455145
JSON support was backported via mysql/mysql-server@3e14f9f in 5.7.8.
VECTOR was added in mysql 9.0.0 in mysql/mysql-server@8cd51511de

Replaces GH-20245.
2025-10-23 18:45:34 +02:00
Jakub Zelenka
eef11e048d Fix GH-19798: XP_SOCKET XP_SSL: Incorrect condition for Win
This fixes incorrect type conversion and subsequent check for Windows
where returned socket is not an int.

It should be noted that this is not really an issue as previous int
would get negative so the check should still work. The issue actually
happens only in master (PHP 8.5) where refactoring has been done and the
type changed.

Closes GH-19881
2025-10-23 15:11:14 +02:00
Niels Dossche
48e36085ea [ci skip] Add myself to tidy extension maintainers
I've been looking after this de-facto, and can review PRs.
This doesn't add much extra workload anyway.
2025-10-22 21:55:05 +02:00
Niels Dossche
ce0df1a9d8 phar: Fix memory leak when opening temp file fails while trying to open gzip-compressed archive
`filterparams` can leak if `php_stream_fopen_tmpfile()` fails.
To solve this, move the temp file creation first.

Closes GH-20220.
2025-10-21 20:04:13 +02:00
Niels Dossche
cc83761416 phar: Fix file descriptor leak in phar_zip_flush() on failure.
Closes GH-20228.
2025-10-21 19:36:08 +02:00
Ilija Tovilo
4043e5fdfc Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Fix nightly notification workflow url
2025-10-21 18:05:42 +02:00
Ilija Tovilo
270e3da220 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Fix nightly notification workflow url
2025-10-21 18:05:29 +02:00
Ilija Tovilo
7877de29e0 [skip ci] Fix nightly notification workflow url
jobs_url is a link to the api, rather than the website.

Also tweak wording, as we now only send one notification per workflow, rather
than per failed job.
2025-10-21 17:57:30 +02:00
Ilija Tovilo
217fceaf58 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Auto-mark SKIP_PERF_SENSITIVE tests as flaky
2025-10-21 17:53:17 +02:00
Ilija Tovilo
db98c5717e Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Auto-mark SKIP_PERF_SENSITIVE tests as flaky
2025-10-21 17:53:10 +02:00
Ilija Tovilo
99076ebfb0 [skip ci] Auto-mark SKIP_PERF_SENSITIVE tests as flaky
These can occasionally fail in CI.
2025-10-21 17:52:04 +02:00
Ilija Tovilo
b751582705 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Also skip check_default_conf_path.phpt on Windows & 8.2
  Revert "Fix Windows test for openssl-3.5 upgrade (#19384)"
2025-10-21 01:25:06 +02:00
Ilija Tovilo
f65a574a36 [skip ci] Also skip check_default_conf_path.phpt on Windows & 8.2
I don't know why the output is different only in 8.2. Revert for now to make CI
happy.
2025-10-21 01:23:58 +02:00