Commit Graph

15421 Commits

Author SHA1 Message Date
Eric Mann
9e1a1c104d
Fix NEWS typo 2024-06-05 10:21:52 -07:00
Niels Dossche
7fe03e1a1b
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix parameter numbers for imagecolorset()
2024-06-05 18:04:53 +02:00
Giovanni Giacobbi
da769be7c9
Fix parameter numbers for imagecolorset()
This is the 8.2 & 8.3 version of GH-14477.
2024-06-05 18:01:59 +02:00
Eric Mann
b8196977b9
[skip ci] update NEWS 2024-06-05 06:58:24 -07:00
Pierrick Charron
04b9bc2ae7
Merge branch 'PHP-8.2' into PHP-8.3 2024-06-05 09:06:52 -04:00
Pierrick Charron
473cbdf558
[skip ci] Update NEWS 2024-06-05 09:00:31 -04:00
Calvin Buckley
b8a7cf9f19 [skip ci] update NEWS for GH-14457 2024-06-04 12:50:53 -03:00
Calvin Buckley
3e3e3b33f8 [skip ci] update NEWS for GH-14457 2024-06-04 12:49:02 -03:00
Niels Dossche
3e8752169c
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-11188: Error when building TSRM in ARM64
2024-06-03 21:11:20 +02:00
nielsdos
644d3628e3
Fix GH-11188: Error when building TSRM in ARM64
Although the issue mentioned FreeBSD, this is a broader problem:
the current ARM64 code to load the TLS offset assumes a setup with
the non-default TLS model. This problem can also apply on some
configurations on other platforms.

Closes GH-11236.
2024-06-03 20:28:55 +02:00
Niels Dossche
c87f29f685
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix reference handling in SpoofChecker
2024-06-01 20:40:17 +02:00
Niels Dossche
5ec26edfb6
Fix reference handling in SpoofChecker
Closes GH-14414.
2024-06-01 20:35:57 +02:00
Niels Dossche
98c8518b39
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix bug #76232: SoapClient Cookie Header Semicolon
2024-06-01 17:38:00 +02:00
Niels Dossche
1b1677a8f1
Fix bug #76232: SoapClient Cookie Header Semicolon
According to RFC 6265 [1] the cookies must be separated by "; " not ";",
and it must not end with ";".

[1] https://datatracker.ietf.org/doc/html/rfc6265

Closes GH-14406.
2024-06-01 17:37:30 +02:00
Niels Dossche
d11a3c6579
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix bug #69280: SoapClient classmap doesn't support fully qualified class name (#14398)
2024-06-01 13:31:02 +02:00
Niels Dossche
476706165a
Fix bug #69280: SoapClient classmap doesn't support fully qualified class name (#14398)
There's a hash table that maps type names to class name, but names with
a leading backslash are not supported. The engine has logic to strip
away the leading backslash that we should replicate here.

It works by checking if we need to make an actual copy in case an
unexpected (e.g. invalid data or leading backslash) situations are
detected. Upon making a copy we normalize the data in the table.

Furthermore, previously the code assumed that the key was always valid
and that the structure was a non-packed hash table. This isn't
necessarily the case. The new code fixes this as well.

Closes GH-14398.
2024-06-01 13:29:26 +02:00
Bob Weinand
d98586b6ed Merge branch 'PHP-8.2' into PHP-8.3 2024-06-01 02:41:39 +02:00
Bob Weinand
be7f3aa474 Fix GH-14387: Crash when stack walking in destructor of yielded from values during Generator->throw() 2024-06-01 02:38:55 +02:00
Niels Dossche
cac4290fb6
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix memory leaks with string function name lookups
2024-05-31 21:23:13 +02:00
Niels Dossche
18233e0f2e
Fix memory leaks with string function name lookups
There's a few leaks where the string is copied for lowercasing but not released.
Where possible, use the _lc functionality of zend_hash to do the lookup
to avoid the leaks that currently exist with the manual lowercasing.

Closes GH-14390.
2024-05-31 21:22:37 +02:00
Niels Dossche
2b1097a87d
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix reading zlib ini settings in ext-soap
  Fix memory leak if calling SoapServer::setClass() twice
  Fix memory leak if calling SoapServer::setObject() twice
  Fix missing error restore code in ext-soap (#14379)
  Fix GH-14368: Test failure in ext/session/tests/gh13856.phpt (#14378)
2024-05-31 18:26:22 +02:00
Niels Dossche
89c4db9c22
Fix reading zlib ini settings in ext-soap
zend_ini_long() actually expects the length without the NUL byte, but
we're passing the length *with* the NUL byte. This mess can actually be
avoided altogether by using INI_INT, so use that instead.

Closes GH-14382.
2024-05-31 18:21:34 +02:00
Niels Dossche
23912f55eb
Fix memory leak if calling SoapServer::setClass() twice
Closes GH-14381.
2024-05-31 18:21:00 +02:00
Niels Dossche
51bb9c2c2a
Fix memory leak if calling SoapServer::setObject() twice
Closes GH-14380.
2024-05-31 18:20:37 +02:00
Niels Dossche
6aa66e0806
Fix missing error restore code in ext-soap (#14379)
The begin and end macros should be paired, but some of the end macro
calls were missing.
2024-05-31 18:19:00 +02:00
Niels Dossche
7c947b57b7
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Partially backport GH-13782 to stable branches
2024-05-30 21:02:03 +02:00
Niels Dossche
c815cdcfe7
Partially backport GH-13782 to stable branches
This partially backports that PR to stable branches as it has been in master
without reported problems so far.
It's only a partial backport because the stable branches don't have the
ZTS persistent resource fix that would fix shutdown crashes, i.e. the
code change in mysqlnd_vio's close_stream is not backported.

This is fully fixed on master.

Closes GH-14324.
Closes GH-10599.
2024-05-30 20:58:54 +02:00
Gina Peter Banyard
ba7b305530
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  ext/bcmath: Fixed bug (bcpowmod() with mod = -1 returns 1 when it must be 0)
2024-05-30 15:51:05 +01:00
Gina Peter Banyard
709869c8bd
ext/bcmath: Fixed bug (bcpowmod() with mod = -1 returns 1 when it must be 0) 2024-05-30 15:47:25 +01:00
Niels Dossche
fe0214bb55
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix bug #47925 again (#14348)
  Fix GH-14343: Memory leak in xml and dom (#14347)
2024-05-29 17:51:47 +02:00
Niels Dossche
88ff32a25b
Fix GH-14343: Memory leak in xml and dom (#14347)
If there is no root, the namespace cannot be attached to it,
so we have to attach it to the old list.

This isn't a problem in "new DOM" because namespaces are managed in a
separate structure there.
2024-05-29 17:49:07 +02:00
Arnaud Le Blanc
5e895dda15
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix TLS access in JIT on FreeBSD/amd64
2024-05-28 15:43:59 +02:00
Arnaud Le Blanc
79862f24da
Fix TLS access in JIT on FreeBSD/amd64
DTV elements are 8 bytes in size a per ABI [1], and the index is offset by 1
on FreeBSD [2]

[1] http://people.redhat.com/drepper/tls.pdf
[2] bf56e8b9c8/libexec/rtld-elf/rtld.c (L5260)

Closes GH-13928
2024-05-28 15:42:57 +02:00
Arnaud Le Blanc
3b2764bc76
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Use ITIMER_REAL for timeout handling on MacOS / Apple Silicon system
2024-05-28 15:26:53 +02:00
Manuel Kress
272da51bfd
Use ITIMER_REAL for timeout handling on MacOS / Apple Silicon system
setitimer(ITIMER_PROF) fires too early on MacOS 14 when running on Apple
Silicon. See https://openradar.appspot.com/radar?id=5583058442911744.

Fixes GH-12814
Closes GH-13567
2024-05-28 15:25:46 +02:00
Niels Dossche
deeeacf42a
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix bug #47925: PHPClient can't decompress response (transposed uncompress methods?)
2024-05-27 19:24:10 +02:00
Niels Dossche
35e62e9b59
Fix bug #47925: PHPClient can't decompress response (transposed uncompress methods?)
The incorrect functions are being called to deal with incoming
compressed data.
gzip/x-gzip corresponds to gzuncompress(), while deflate corresponds to
gzinflate().

The existing code for gzip compression also plays with removing the
first 10 bytes (i.e. the gzip header) to pass it to the inflate
implementation but that doesn't always work properly due to trailer
data. Get rid of that entirely by using the correct functions.

Closes GH-14321.
2024-05-27 19:23:40 +02:00
Peter Kokot
b09922b657
[skip ci] Update NEWS
Adding missed PHP-8.3 entry since these notes must be in all active
branches where the change was done except for the master branch.
2024-05-25 14:47:30 +02:00
Peter Kokot
9e226b2881
Fix incompatible pointer type warnings
This fixes the incompatible pointer type warnings when checking for
reentrant functions declaractions (-Wincompatible-pointer-types) in
config.log. These were not declared on some obsolete systems if
_REENTRANT was not defined. The check is for now left in the code base
but can be transitioned to newer code without checking for missing
declarations or using these otherwise in the future.

Closes GH-14315.
2024-05-24 20:57:52 +02:00
Niels Dossche
ae26dc11d1
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-14307: Test curl_basic_024 fails with curl 8.8.0
2024-05-24 14:42:41 +02:00
Niels Dossche
a2c5b4ec05
Fix GH-14307: Test curl_basic_024 fails with curl 8.8.0
Curl changed the behaviour, from the changelog:
  - lib: make protocol handlers store scheme name lowercase curl/curl@c294f9c

From the docs: "The returned scheme might be upper or lowercase. Do
comparisons case insensitively."

Closes GH-14312.
2024-05-24 14:41:29 +02:00
Niels Dossche
af444f97e1
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix memory leaks in ext/sodium on failure of some functions
2024-05-23 22:40:54 +02:00
Niels Dossche
4da46107c4
Fix memory leaks in ext/sodium on failure of some functions
Infallible in practice right now, but should be fixed as infallible today does not mean infallible tomorrow:
- sodium_crypto_sign_publickey_from_secretkey
- sodium_crypto_kx_seed_keypair
- sodium_crypto_kx_keypair
- sodium_crypto_auth
- sodium_crypto_sign_ed25519_sk_to_curve25519
- sodium_pad

Fallible today:
- sodium_crypto_sign_ed25519_pk_to_curve25519

Closes GH-14309.
2024-05-23 22:40:28 +02:00
Ilija Tovilo
706e79761e
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix enabling of JIT at runtime
2024-05-22 14:33:25 +02:00
Ilija Tovilo
9506ca6001
Fix enabling of JIT at runtime
Fixes GH-14267
Closes GH-14294
2024-05-22 14:32:43 +02:00
Niels Dossche
88af09193d
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-14290: Member access within null pointer in extension spl
2024-05-21 23:24:15 +02:00
Niels Dossche
b3a56bd558
Fix GH-14290: Member access within null pointer in extension spl
php_pcre_replace_impl() can fail and return NULL. We should take that
error condition into account. Because other failures return false, we
return false here as well.

At first, I also thought there was a potential memory leak in the error
check of replacement_str, but found that the error condition can never
trigger, so replace that with an assertion.

Closes GH-14292.
2024-05-21 23:20:32 +02:00
Pierrick Charron
c69c84a5f6
PHP-8.2 is now for PHP 8.2.21-dev 2024-05-21 14:32:07 -04:00
Eric Mann
eb7a574a8d
PHP-8.3 is now for PHP 8.3.9-dev 2024-05-21 07:48:56 -07:00
Derick Rethans
e5cb9d7df9
Force ffp-contract to off 2024-05-20 15:13:53 +01:00