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

69276 Commits

Author SHA1 Message Date
Jakub Zelenka
5eb6a81b60 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Update NEWS entry for curl 8.16 update
  Update NEWS with info about curl 8.16 compat fixes
  Fix curl_setopt_ssl test for curl 8.16
  Fix more curl 8.16 issues
  Fix curl 8.16.0 compilation with zts
  Fix curl build failure on macOS+curl 8.16
2025-10-07 14:41:20 +02:00
Jakub Zelenka
201b358c01 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Update NEWS with info about curl 8.16 compat fixes
  Fix curl_setopt_ssl test for curl 8.16
  Fix more curl 8.16 issues
  Fix curl 8.16.0 compilation with zts
  Fix curl build failure on macOS+curl 8.16
2025-10-07 14:37:47 +02:00
Jakub Zelenka
810aed1141 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Update NEWS with info about curl 8.16 compat fixes
  Fix curl_setopt_ssl test for curl 8.16
  Fix more curl 8.16 issues
  Fix curl 8.16.0 compilation with zts
  Fix curl build failure on macOS+curl 8.16
2025-10-07 14:30:22 +02:00
Jakub Zelenka
36859ad977 Fix curl_setopt_ssl test for curl 8.16 2025-10-07 14:18:41 +02:00
Ilija Tovilo
b810a23587 Fix more curl 8.16 issues
The CURLOPT_FOLLOWLOCATION seems like a gcc bug, where the integer extension of
bool to long is lost, but I was unable to reproduce on godbolt.org.
2025-10-07 14:18:41 +02:00
Ilija Tovilo
da75e41a6f Fix curl 8.16.0 compilation with zts 2025-10-07 14:18:41 +02:00
Niels Dossche
1c8363d2bf Fix curl build failure on macOS+curl 8.16 2025-10-07 14:18:41 +02:00
Arnaud Le Blanc
359ad80c4a Fix race condition in zend_runtime_jit(), zend_jit_hot_func()
zend_runtime_jit() prevents concurrent compilation with
zend_shared_alloc_lock(), but this doesn't prevent blocked threads from
trying to compile the function again after they acquire the lock.

In the case of GH-19889, one of the function entries is compiled with
zend_jit_handler(), which fails when the op handler has already been replaced by
a JIT'ed handler.

Fix by marking compiled functions with a new flag ZEND_FUNC_JITED, and
skipping compilation of marked functions. The same fix is applied to
zend_jit_hot_func().

Fixes GH-19889
Closes GH-19971
2025-10-07 10:48:44 +02:00
Niels Dossche
2edb369181 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-19570: unable to fseek in /dev/zero and /dev/null
2025-10-06 18:16:37 +02:00
Niels Dossche
b7aeb0a69f Fix GH-19570: unable to fseek in /dev/zero and /dev/null
On Linux, these two character devices are exceptions in that they can be
seeked. Check their major/minor device number.

Co-authored-by: divinity76 <hans@loltek.net>
2025-10-06 18:16:16 +02:00
Alexandre Daubois
2cc4532865 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-19926: reset internal pointer earlier while splicing array while COW violation flag is still set (#19929)
2025-10-06 16:52:50 +02:00
Alexandre Daubois
64c1d43b68 Fix GH-19926: reset internal pointer earlier while splicing array while COW violation flag is still set (#19929) 2025-10-06 16:51:23 +02:00
Niels Dossche
33718fb5f7 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  phar: Fix memory leaks when creating temp file fails when applying zip signature
2025-10-05 21:11:03 +02:00
Niels Dossche
66c833444c phar: Fix memory leaks when creating temp file fails when applying zip signature
Also fixes up the error propagation at the call site which jumped to the
wrong place in the error handling code.

Closes GH-20057.
2025-10-05 21:10:34 +02:00
Niels Dossche
f2f84e36eb Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-20043: array_unique assertion failure with RC1 array causing an exception on sort
2025-10-05 20:15:55 +02:00
Niels Dossche
4fed57e746 Fix GH-20043: array_unique assertion failure with RC1 array causing an exception on sort
The reason this happens is because the array_unique operation happens in-place
because the input array is RC1.
At one point during comparison an exception is thrown which will capture the
arguments in the backtrace, which will increment the refcount of the RC1 array
to 2. Then a modification happens after the throw on the RC2 array causing the
assertion failure.
We shouldn't try continue work after an exception happened during the sort.

Closes GH-20059.
2025-10-05 20:15:28 +02:00
Ilija Tovilo
0e1addf8b5 Skip mysqli_fetch_all_data_types_variation.phpt on PPC runner 2025-10-03 23:11:47 +02:00
Niels Dossche
19f345c824 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-20011: Array of SoapVar of unknown type causes crash
2025-10-02 19:39:25 +02:00
Niels Dossche
eab2c2007b Fix GH-20011: Array of SoapVar of unknown type causes crash
We "guess" the type in this case, consistent with what a SoapVar would
do outside of an array.

Closes GH-20030.
2025-10-02 19:38:44 +02:00
David Carlier
3193fe0728 Merge branch 'PHP-8.3' into PHP-8.4 2025-10-02 12:30:41 +01:00
David Carlier
175afc4085 Fix GH-19705: do not flush/write buffer on non writeable stream.
Co-authored-by: Jakub Zelenka <bukka@php.net>

close GH-19708
2025-10-02 12:28:36 +01:00
Niels Dossche
b1d487a276 Fix GH-20022: docker-php-ext-install DOM failed
Closes GH-20023.
2025-10-01 13:00:59 +02:00
Niels Dossche
71f8c39962 Fix test 2025-10-01 12:58:50 +02:00
Niels Dossche
7dd7ad843d Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-17345: Bug #35916 was not completely fixed
2025-10-01 11:50:05 +02:00
Niels Dossche
0ffa337a54 Fix GH-17345: Bug #35916 was not completely fixed
Change the reproducer code in `bug35916.phpt` from `stream_bucket_append` to
`stream_bucket_prepend` and you have the same bug.
Furthermore, even in the append case the check is incorrect because the bucket
can already be in the brigade at a position other than the tail.
To solve this properly, unlink the brigade first and also use that as a
condition to manage the refcount.

Closes GH-18973.
2025-10-01 11:49:28 +02:00
Alexandre Daubois
0cf500ec4c Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-16319: protect fiber backtrace with null filename from crashing (#19973)
2025-10-01 11:26:14 +02:00
Alexandre Daubois
9fc14a90c6 Fix GH-16319: protect fiber backtrace with null filename from crashing (#19973) 2025-10-01 11:24:58 +02:00
Niels Dossche
9bd9e3a1f9 Fix build 2025-10-01 10:54:41 +02:00
Niels Dossche
c3d17d93d3 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix memory leak and invalid continuation after tar header writing fails
2025-10-01 10:47:28 +02:00
Niels Dossche
7c859268c0 Fix memory leak and invalid continuation after tar header writing fails
Closes GH-20003.
2025-10-01 10:46:33 +02:00
Niels Dossche
58b45b5055 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-20009: XMLReader leak on RelaxNG schema failure
2025-09-30 18:07:08 +02:00
Niels Dossche
c617afd6d6 Fix GH-20009: XMLReader leak on RelaxNG schema failure
Closes GH-20014.
2025-09-30 18:06:35 +02:00
Niels Dossche
4496322e42 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix bug #67563: mysqli compiled with mysqlnd does not take ipv6 adress as parameter
2025-09-30 15:20:50 +02:00
Niels Dossche
6db12e7cd8 Fix bug #67563: mysqli compiled with mysqlnd does not take ipv6 adress as parameter
In the past, when libmysqlclient could be used, it accepted ipv6 addresses
as hostname without enclosing it first in brackets. However, in mysqlnd
this never worked. In the past this caused a discrepancy between the two
implementations.
Nowadays, mysqli only works with mysqlnd so we don't even have to cater
to libmysqlclient. However, a plain ipv6 address should still work as a
hostname. Also for people migrating to newer PHP versions it's nice if
this keeps working.

The solution is to check if we're dealing with an ipv6 address not yet
enclosed in brackets. In that case we add the brackets automatically.

Closes GH-19750.
2025-09-30 15:20:14 +02:00
Niels Dossche
7e47226fd6 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-19998: ext/standard/tests/file/bug46347.phpt sometimes fails: racy in parallel
2025-09-30 10:53:17 +02:00
Niels Dossche
21c2c07a24 Fix GH-19998: ext/standard/tests/file/bug46347.phpt sometimes fails: racy in parallel
The same test file name is already used in parse_ini_file.phpt.

Closes GH-20000.
2025-09-30 10:52:59 +02:00
David Carlier
1015de30f0 Merge branch 'PHP-8.3' into PHP-8.4 2025-09-29 23:20:38 +01:00
David Carlier
e029f8f45b Fix GH-19955: imagefttext() memory leak
close GH-19968
2025-09-29 23:20:27 +01:00
David Carlier
03de7b0b28 Merge branch 'PHP-8.3' into PHP-8.4 2025-09-29 22:48:38 +01:00
David Carlier
93bac8cb1a Fix GH-19922: gzopen() double free
close GH-19924
2025-09-29 22:47:29 +01:00
David Carlier
4e00b14029 Merge branch 'PHP-8.3' into PHP-8.4 2025-09-29 22:10:46 +01:00
David Carlier
3ee56f68ed Fix GH-19932: Zip::setEncryptionName()/setEncryptionIndex() memory leak.
On successive usage, the password is copied as much but the older
address is never freed. Thus, we are hinting a password reset to address
it.

close GH-19936
2025-09-29 22:10:17 +01:00
Niels Dossche
1bda46eb83 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix NEWS order
  Fix GH-19988: zend_string_init with NULL pointer in simplexml (UB)
2025-09-29 16:08:31 +02:00
Niels Dossche
d94846c3b4 Fix GH-19988: zend_string_init with NULL pointer in simplexml (UB)
Normally, simplexml cannot import document nodes,
but xsl allows to circumvent this.
A document does not have a name, so we return the empty string
in that case.
While we could add an explicit check, we might as well switch
the macro to a form that would be more optimal anyway as many
tag names can be single characters.

The test was added in xsl because adding it in simplexml would
break out-of-tree builds of simplexml.

Closes GH-19990.
2025-09-29 16:07:34 +02:00
Jakub Zelenka
8a9f95b23a Merge branch 'PHP-8.3' into PHP-8.4 2025-09-27 12:46:10 +02:00
Jakub Zelenka
f9dc073b04 Add stream filter convert.* tests (#19976)
The convert.* filters are quite untested so this tries to improve it.

Closes GH-19976
2025-09-27 12:43:28 +02:00
Remi Collet
6118c19ab8 zip is now 1.22.7 2025-09-25 12:19:27 +02:00
Ilija Tovilo
473ce44108 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix more curl 8.16 issues
2025-09-23 16:22:06 +02:00
Ilija Tovilo
a885372a08 Fix more curl 8.16 issues
The CURLOPT_FOLLOWLOCATION seems like a gcc bug, where the integer extension of
bool to long is lost, but I was unable to reproduce on godbolt.org.
2025-09-23 16:11:19 +02:00
Dmitry Stogov
1302b9f6da Update IR
IR commit: 425ca45ffed99b6d3085c6a7f7c9d4fb3c2b5737
2025-09-22 20:14:21 +03:00