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

140283 Commits

Author SHA1 Message Date
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
Tim Düsterhus
b79817b898 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  CI: Do not save ccache for PRs for LINUX_X32
2025-10-04 20:02:21 +02:00
Tim Düsterhus
51275be6c5 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  CI: Do not save ccache for PRs for LINUX_X32
2025-10-04 20:02:12 +02:00
Tim Düsterhus
db65d22ce2 CI: Do not save ccache for PRs for LINUX_X32
see #14168 which added this for all other builds
see 69dbfadd1e which added the LINUX_X32 build
2025-10-04 20:00:50 +02:00
Ilija Tovilo
0e1addf8b5 Skip mysqli_fetch_all_data_types_variation.phpt on PPC runner 2025-10-03 23:11:47 +02:00
Ilija Tovilo
019a179fe5 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Automatically skip tty tests if not on tty
2025-10-03 00:47:13 +02:00
Ilija Tovilo
831597748b Automatically skip tty tests if not on tty
See GH-19975
Closes GH-20013
2025-10-03 00:45:20 +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
Jakub Zelenka
57e1438ca5 Merge branch 'PHP-8.3' into PHP-8.4 2025-10-02 19:22:59 +02:00
Jakub Zelenka
288d698ce4 Prevent use after stack scope in stream strerr code (#20040) 2025-10-02 19:22:28 +02:00
Jakub Zelenka
10eb3d69c7 Merge branch 'PHP-8.3' into PHP-8.4 2025-10-02 13:43:47 +02:00
Jakub Zelenka
a3c14d6ab4 Do not use errno_t as it is not defined on musl (#20037) 2025-10-02 13:42:11 +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
Ilija Tovilo
2a74729d92 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix broken build on *BSD with MSAN
2025-10-02 00:44:37 +02:00
Guillaume Outters
26ca363a13 Fix broken build on *BSD with MSAN
The #if to declare instrumented versions of strlcpy and strlcat was too
inclusive on *BSD systems where Clang already provides instrumented strong
symbols, resulting in "duplicate symbol" at link-time.

Fix GH-20002
Closes GH-20032
2025-10-02 00:43:50 +02: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
Jakub Zelenka
152dfa8835 Merge branch 'PHP-8.3' into PHP-8.4 2025-10-01 11:12:42 +02:00
Jakub Zelenka
b7fdfb7147 Fix GH-19248: Use strerror_r instead of strerror in main
Or on Windows it is going to use either FormatMessageW or strerror_s
for compatibility with previous error messages.

It also needs to accomodate for GNU and BSD versions of strerror_r
returning different type.

Closes GH-19251
2025-10-01 11:12:08 +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
879c772772 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix NEWS formatting
2025-09-30 15:22:30 +02:00
Niels Dossche
d9ee711baf Fix NEWS formatting 2025-09-30 15:21:47 +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
190f427198 Fix NEWS order 2025-09-29 16:07:45 +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
Ilija Tovilo
a6b32bd8fc Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Change master branch check to 8.6
2025-09-28 11:56:18 +02:00
Ilija Tovilo
8756ee034d Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Change master branch check to 8.6
2025-09-28 11:56:11 +02:00