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

135957 Commits

Author SHA1 Message Date
Eric Mann
ae65e645b7 Update versions for PHP 8.3.27 php-8.3.27 2025-10-21 07:53:41 -07:00
Jakub Zelenka
78a24ffc03 Update NEWS entry for curl 8.16 update 2025-10-07 14:39:53 +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
742b7d8e55 Update NEWS with info about curl 8.16 compat fixes 2025-10-07 14:25:08 +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
a6e81582b7 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Upgrade Alpine in nightly job
2025-10-07 10:59:23 +02:00
Arnaud Le Blanc
a30c92c9b5 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Upgrade Alpine in nightly job
2025-10-07 10:59:11 +02:00
Arnaud Le Blanc
66708de841 Upgrade Alpine in nightly job
Closes GH-20044
2025-10-07 10:58:36 +02:00
Tim Düsterhus
9d9b73a3f0 .gdbinit: Fix printing of variable names in print_cvs (#20077)
Previously only the first character of each variable was printed.
2025-10-06 20:17:53 +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
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
Leo Gaskin
7e7d6d6380 Treat accept failing with SOCK_EAGAIN as success in CLI web server
This ensures that no useless "Failed to poll event" error messages are
logged during normal server operation, as the SOCK_EAGAIN error simply
indicates another worker is already serving the request.

Closes GH-19964
2025-10-06 14:19:45 +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
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
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
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
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
288d698ce4 Prevent use after stack scope in stream strerr code (#20040) 2025-10-02 19:22:28 +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
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
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
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
9fc14a90c6 Fix GH-16319: protect fiber backtrace with null filename from crashing (#19973) 2025-10-01 11:24:58 +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
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
c617afd6d6 Fix GH-20009: XMLReader leak on RelaxNG schema failure
Closes GH-20014.
2025-09-30 18:06:35 +02:00
Niels Dossche
d9ee711baf Fix NEWS formatting 2025-09-30 15:21:47 +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
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
e029f8f45b Fix GH-19955: imagefttext() memory leak
close GH-19968
2025-09-29 23:20:27 +01:00
David Carlier
93bac8cb1a Fix GH-19922: gzopen() double free
close GH-19924
2025-09-29 22:47:29 +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
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
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
Ilija Tovilo
5dd764b1b3 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Change master branch check to 8.6
2025-09-28 11:56:01 +02:00
Shivam Mathur
107075605d Change master branch check to 8.6 2025-09-28 09:54:13 +05:30
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
Ilija Tovilo
68d5ddbda1 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Add 8.6 to nightly_matrix.php
2025-09-23 23:42:12 +02:00
Ilija Tovilo
e370c57156 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Add 8.6 to nightly_matrix.php
2025-09-23 23:42:05 +02:00
Ilija Tovilo
197921a8aa [skip ci] Add 8.6 to nightly_matrix.php 2025-09-23 23:41:42 +02:00
Ilija Tovilo
c6a6cb79f9 [skip ci] Skip php_cli_server_pdeathsig.phpt if pgrep is missing
Fixes GH-19911
Closes GH-19923
2025-09-23 17:14:51 +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
Ilija Tovilo
266cb7d892 Fix curl 8.16.0 compilation with zts 2025-09-22 10:55:59 +02:00
David Carlier
933e087843 Fix GH-19885: dba_fetch() overflow on skip argument.
close GH-19887
2025-09-21 14:23:53 +01:00