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

140836 Commits

Author SHA1 Message Date
ndossche
ef54becb3e Fix missing error propagation when php_array_to_X509_sk() fails
Execution shouldn't continue if this fails because it can give the wrong
results.
2026-02-17 21:39:51 +01:00
ndossche
01d598aea3 Fix memory leaks in php_array_to_X509_sk() when push fails 2026-02-17 21:39:50 +01:00
ndossche
4b9e80eae9 Fix memory leak in php_openssl_load_all_certs_from_file() when push fails 2026-02-17 21:39:50 +01:00
Ilija Tovilo
1931472f22 Fix borked SCCP of array containing partial object
In SCCP, arrays containing partial objects must be marked as partial so that
their values are not accidentally propagated.

Fixes GH-21227
Closes GH-21232
2026-02-17 18:11:28 +01:00
Ilija Tovilo
dc977efe52 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix array_column() on null in nightly_matrix.php
2026-02-17 17:56:05 +01:00
Ilija Tovilo
217600de81 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix array_column() on null in nightly_matrix.php
2026-02-17 17:56:00 +01:00
Ilija Tovilo
60718c7f43 Fix array_column() on null in nightly_matrix.php 2026-02-17 17:55:23 +01:00
Ilija Tovilo
8d6fbd13c0 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Unify push & nightly workflows
2026-02-17 17:50:33 +01:00
Ilija Tovilo
03bd03b793 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Unify push & nightly workflows
2026-02-17 17:50:17 +01:00
Ilija Tovilo
f7b58d3938 Unify push & nightly workflows
Also introduce label-based opt-in and opt-out mechanism for jobs.

Closes GH-21172
2026-02-17 17:48:11 +01:00
Ilija Tovilo
3876dff8d9 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Sync nightly.yml with master
2026-02-17 17:34:30 +01:00
Ilija Tovilo
c5e9bab1b8 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Sync nightly.yml with master
2026-02-17 17:34:13 +01:00
Ilija Tovilo
4be0d5ecef [skip ci] Sync nightly.yml with master 2026-02-17 17:34:02 +01:00
David Carlier
f7af877cfe ext/pgsql: fix GH-21165 unit test.
making it fails early instead.

close GH-21234
2026-02-17 04:26:42 +00:00
Jordi Kroon
37c5a13d67 replace alloca with do_alloca in mb_guess_encoding_for_strings
This avoids a crash in cases where the list of candidate encodings is so huge
that alloca would fail. Such crashes have been observed when the list of
encodings was larger than around 208,000 entries.
2026-02-17 06:46:42 +09:00
ndossche
84bfe2fadd Update EXTENSIONS to reflect reality
Not very interested in doing active development on these components
anymore, I'll be around to fix critical issues however.
2026-02-16 19:22:03 +01:00
Arnaud Le Blanc
ede7c67389 Fix build with -std=
When building in strict mode (e.g. -std=c11), compilation of
main/debug_gdb_scripts.c fails because asm() is not a standard top level
statement. __asm__() however can be reserved by the compiler even in strict
mode.

Partially fixes GH-21215. IR needs a similar fix (dstogov/ir#128).
Closes GH-21226.
2026-02-16 14:48:48 +01:00
David Carlier
b6495c189a ext/sockets: socket_sendto() add max addr length control for AF_UNIX.
we just mirror what is done for socket_connect()/AF_UNIX type.

close GH-21218
2026-02-15 21:54:19 +00:00
David Carlier
539c5d9f76 Fix GH-21162: pg_connect() on error memory leak.
The PHP_PQ_ERROR macro calls php_error_docref() which triggers user error handlers
thus libpq does not have the chance to clean the resources (and empty
connections string are allowed) on failure thus we avoid this macro
and delay the error handling after.

close GH-21165
2026-02-15 21:26:23 +00:00
Ilija Tovilo
901ebd21f3 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Disable pkg cache for FreeBSD jobs
2026-02-10 01:16:58 +01:00
Ilija Tovilo
5b227b38e1 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Disable pkg cache for FreeBSD jobs
2026-02-10 01:16:51 +01:00
Ilija Tovilo
10aadd635b Disable pkg cache for FreeBSD jobs
These caches can get massive and evict more useful cache, like ccache.

Closes GH-21179
2026-02-10 01:16:23 +01:00
Dmitry Stogov
dd9421d825 Update IR (#21183)
IR commit: a098f9ed6c2f1c2852d6c0921283212aafb4afed
2026-02-10 01:34:09 +03:00
David Carlier
19ee3e6697 Fix GH-21161: socket_set_option() crash with array 'addr' entry as null.
in the ipv6 address creation helper we need to use, for the error
message, the converted data rather than assuming the original
is a proper zend_string().

close GH-21166
2026-02-09 19:26:48 +00:00
Petr Sumbera
7c6f08945f Improve shared_alloc_shm.c strategy to support OPcache JIT on Solaris
The SysV shared memory allocator in OPcache hardcodes a maximum segment size of
32MB (SEG_ALLOC_SIZE_MAX). If the JIT buffer exceeds this, which it does with
the default 64MB size, startup will fail with "Insufficient shared memory!".

The allocator will now try allocating a contiguous buffer first, and only then
use segmentation by searching for continuously smaller powers of 2.

Fixes GH-20718
Closes GH-20719
2026-02-09 14:58:13 +01:00
Ilija Tovilo
2cabea66b3 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [CI] Use MySQL LTS version
2026-02-08 17:00:20 +01:00
Ilija Tovilo
44b0b14ae0 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [CI] Use MySQL LTS version
2026-02-08 17:00:11 +01:00
武田 憲太郎
2a3e970d4c [CI] Use MySQL LTS version
Update the MySQL version used in CI from 8.3 to 8.4, the current MySQL LTS
release. CI has been using MySQL 8.3 due to a MySQL-side bug that caused test
failures (see GH-14112, GH-14113, GH-14120). That issue has now been fixed
upstream in MySQL 8.4.8.

References:

* MySQL 8.4.8 release notes (pluggable authentication fix):
  https://dev.mysql.com/doc/relnotes/mysql/8.4/en/news-8-4-8.html#mysqld-8-4-8-pluggable-auth
* MySQL bug tracker:
  https://bugs.mysql.com/bug.php?id=114876#c555902
* Docker image availability:
  https://hub.docker.com/_/mysql/tags?name=8.4

Closes GH-21154
2026-02-08 16:54:00 +01:00
Ilija Tovilo
bbde9c8178 Fix OSS-Fuzz #478009707 for JIT
This issue was already fixed in GH-21124, but some JIT paths were missing.

Closes GH-21151
2026-02-08 16:46:08 +01:00
Niels Dossche
ee26417b58 Fix timezone offset with seconds losing precision
There are two issues:
1. The 'e' formatter doesn't output the seconds of the timezone even if
   it has seconds.
2. var_dump(), (array) cast, serialization, ... don't include the
   timezone second offset in the output. This means that, for example,
   serializing and then unserializing a date object loses the seconds of
   the timezone. This can be observed by comparing the output of
   getTimezone() for `$dt` vs the unserialized object in the provided test.

Closes GH-20764.
2026-02-05 18:38:54 +01:00
Ilija Tovilo
3cb85cc681 Fix assign-op/inc/dec on untyped hooked property backing value
Fixes OSS-Fuzz #478009707
Closes GH-21124
2026-02-05 14:46:06 +01:00
Niels Dossche
7445b0f6d9 Fix GH-20936: DatePeriod::__set_state() cannot handle null start
The "current" and "end" field also rely on start_ce, which is set by
"start". Therefore, if "current" or "end" are provided, so must "start"
be provided.

Closes GH-20939.
2026-02-04 18:34:38 +01:00
Niels Dossche
b8fc6bd1c8 Fix GH-21097: Accessing Dom\Node properties can can throw TypeError(s)
Split the handler again, or defer to instanceof when performance doesn't
matter.

Closes GH-21108.
2026-02-03 18:36:28 +01:00
Ilija Tovilo
1dfc8028d8 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Make brew verbose, limit to 10 minutes
2026-02-03 14:49:06 +01:00
Ilija Tovilo
47fbacad43 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Make brew verbose, limit to 10 minutes
2026-02-03 14:48:20 +01:00
Ilija Tovilo
8b47ae8342 Make brew verbose, limit to 10 minutes
This step regularly locks up. Maybe --verbose will provide some insight. Also
limit the step to 10 minutes to avoid holding up resources.
2026-02-03 13:40:41 +01:00
Arnaud Le Blanc
de26827275 Real instance of lazy proxy may have less magic methods
In GH-18039 we guard the underlying property before forwarding access
to the real instance of a lazy proxy. When the real instance lacks magic
methods, the assertion zobj->ce->ce_flags & ZEND_ACC_USE_GUARDS fails in
zend_get_property_guard().

Fix by checking that the real instance uses guards.

Fixes GH-20504
Closes GH-21093
2026-02-03 12:04:35 +01:00
Arnaud Le Blanc
6d6d013d79 Mark object non-lazy before deleting info in zend_lazy_object_realize()
A lazy object is marked non-lazy when all its properties are
initialized. Before doing so we delete the object info, resulting in a
temporarily invalid state. In GH-20657 the GC is triggered at this moment.

Fix by deleting the object info _after_ marking it non lazy.

Fixes GH-20657
Closes GH-21094
2026-02-03 11:48:36 +01:00
Ilija Tovilo
1f57d04648 Tweak zend.max_allowed_stack_size for gh20836_stack_limit.phpt
Fixes GH-21086
2026-02-03 00:54:25 +01:00
Niels Dossche
d73b2f782e Fix GH-21077: Accessing Dom\Node::baseURI can throw TypeError
Prior to this patch there was a common read handler, and it relied on
the dom class set in the intern document. However, Dom\Implementation
allows creating DTDs unassociated with a document, so we can't rely on
an intern document and the check fails. This causes the ZVAL_NULL() path
to be taken.
To solve this, just split the handler.

Closes GH-21082.
2026-01-30 18:13:55 +01:00
David Carlier
b156471a30 Fix GH-21023: CURLOPT_XFERINFOFUNCTION with invalid callback crash.
we check the FCC is properly initialised beforehand in its handler.

close GH-21025
2026-01-30 13:09:44 +00:00
Giovanni Giacobbi
23f4b93523 gen_stub: Fix compatibility with php 7.4 (in PHP-8.4) (#21076) 2026-01-29 11:58:12 +01:00
Kévin Dunglas
371422b9b9 Zend/zend_call_stack.h: fix missing include on Windows (clang compat) (#20847)
Co-authored-by: Tim Düsterhus <tim@tideways-gmbh.com>
2026-01-29 10:38:10 +01:00
Loïc Saos
3037526810 Fix GH-21055: Pdo/Pgsql typo for GSS negotiation connection status attribute.
close GH-21057
2026-01-28 18:12:08 +00:00
Arnaud Le Blanc
93d32eae27 Add missing clobbered registers
Inline assembly in zend_safe_address() clobbers flags register. Add missing
register in clobber list for aarch64 and powerpc64. Other archs were already
correct.

Fixes GH-21029
2026-01-28 18:20:07 +01:00
Saki Takamachi
e6beffb6ed PHP-8.4 is now for PHP 8.4.19-dev 2026-01-27 22:21:42 +09:00
Daniel Scherzer
eb102557cc Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  GitHub actions: drop more 8.1 CI configuration (#20763)
2026-01-27 02:06:20 -08:00
Daniel Scherzer
3aef16abbd Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  GitHub actions: drop more 8.1 CI configuration (#20763)
2026-01-27 02:05:28 -08:00
Daniel Scherzer
2b49403378 GitHub actions: drop more 8.1 CI configuration (#20763)
* remove `libmysqlclient_with_mysqli` support from nightly workflow
* remove `libmysqlclient_with_mysqli` support from root workflow
* remove `withMysqli` support from `build-libmysqlclient` action
* remove `withMysqli` support from `test-libmysqlclient` action
* in root workflow, drop code checking for PHP 8.1

[skip ci]
2026-01-27 02:04:47 -08:00
Alexander Borisov
56e5a80c44 Fix GH-21041: Dom\HTMLDocument corrupts closing tags within scripts 2026-01-26 19:20:10 +01:00