Commit Graph

139166 Commits

Author SHA1 Message Date
Christoph M. Becker
3a1a205f2a
Fix GH-16723: CURLMOPT_PUSHFUNCTION issues
We copy the source handler's FCCs to those of the destination.

We also fix the erroneous test assumption that the trampoline wouldn't
be called.

Closes GH-16732.
2024-11-09 12:43:29 +01:00
Niels Dossche
cc54e66ad8
Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix wrong merge
2024-11-09 11:49:25 +01:00
Niels Dossche
ef1e1868ed
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix wrong merge
2024-11-09 11:49:16 +01:00
Niels Dossche
80dd5a0306
Fix wrong merge 2024-11-09 11:49:08 +01:00
Niels Dossche
56bd057123
[ci skip] NEWS for ReflectionConstant additions 2024-11-09 11:09:36 +01:00
DanielEScherzer
10f1f924cf
Add ReflectionConstant::getExtension() and ::getExtensionName() (#16603) 2024-11-09 11:08:02 +01:00
Niels Dossche
f8f9ac8206
Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix memory leak in php_openssl_pkey_from_zval()
  Fix various memory leaks related to openssl exports
  Prevent unexpected array entry conversion when reading key
2024-11-09 11:01:36 +01:00
Niels Dossche
fd68e9ba2c
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix memory leak in php_openssl_pkey_from_zval()
  Fix various memory leaks related to openssl exports
  Prevent unexpected array entry conversion when reading key
2024-11-09 11:01:29 +01:00
Niels Dossche
591fe92724
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix memory leak in php_openssl_pkey_from_zval()
  Fix various memory leaks related to openssl exports
  Prevent unexpected array entry conversion when reading key
2024-11-09 11:01:21 +01:00
Niels Dossche
994e866cf2
Fix memory leak in php_openssl_pkey_from_zval()
Closes GH-16691.
2024-11-09 10:58:44 +01:00
Niels Dossche
2f4f09f7e6
Fix various memory leaks related to openssl exports
Closes GH-16692.
2024-11-09 10:58:17 +01:00
Niels Dossche
ac8d0e57d9
Prevent unexpected array entry conversion when reading key
When passing an array, the key entry can get converted to a string if it
is an object, but this actually modifies the original array entry.
The test originally outputted:

```
array(2) {
  [0]=>
  string(...) => ...
  [1]=>
  string(0) ""
}
```

This is unexpected. Use zval_try_get_string() to prevent this behaviour.

Closes GH-16693.
2024-11-09 10:57:50 +01:00
Niels Dossche
a3b27c083f
Add Dom\Element::insertAdjacentHTML() (#16614) 2024-11-09 10:52:06 +01:00
Niels Dossche
963511bffa
Merge branch 'PHP-8.4'
* PHP-8.4:
  ext/soap: fix `make check` being invoked in `ext/soap`
2024-11-08 20:48:21 +01:00
Niels Dossche
a85a5ef339
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  ext/soap: fix `make check` being invoked in `ext/soap`
2024-11-08 20:48:06 +01:00
Maximilian Bosch
73c4fa0ea4
ext/soap: fix make check being invoked in ext/soap
On NixOS we run `make` & `make check` inside `ext/soap` which broke the test
like this:

    001+ Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'ext/soap/tests/gh15711.wsdl' : failed to load "ext/soap/tests/gh15711.wsdl": No such file or directory
    002+  in /build/php-8.3.13/ext/soap/tests/gh15711.php:29
    003+ Stack trace:
    004+ #0 /build/php-8.3.13/ext/soap/tests/gh15711.php(29): SoapClient->__construct('ext/soap/tests/...', Array)
    005+ #1 {main}
    006+   thrown in /build/php-8.3.13/ext/soap/tests/gh15711.php on line 29

Fix is to make the path dependant on `__DIR__` as it's the case in other
testcases including WSDLs.

Closes GH-16733.
2024-11-08 20:47:28 +01:00
Christoph M. Becker
e5654b75ac
Merge branch 'PHP-8.4'
* PHP-8.4:
  [skip ci] Fix typo in test name
2024-11-08 20:10:31 +01:00
Christoph M. Becker
6e6373ab89
[skip ci] Fix typo in test name 2024-11-08 20:10:14 +01:00
Christoph M. Becker
f3203f3409
Merge branch 'PHP-8.4'
* PHP-8.4:
  [skip ci] Fix array_any() and array_all() descriptions
2024-11-08 20:02:32 +01:00
FraOre
7bbf2eae8c
[skip ci] Fix array_any() and array_all() descriptions
Closes GH-16731.
2024-11-08 20:02:14 +01:00
Jakub Zelenka
efcd72029c
Merge branch 'PHP-8.4' 2024-11-08 17:04:18 +01:00
Jakub Zelenka
27b4df4247 Fix 8.4 NEWS file 2024-11-08 17:01:02 +01:00
Jakub Zelenka
84400eefbb
Merge branch 'PHP-8.4' 2024-11-08 16:51:19 +01:00
Jakub Zelenka
49bc011c9f
Merge branch 'PHP-8.3' into PHP-8.4 2024-11-08 16:50:41 +01:00
Jakub Zelenka
af8ebb12ca
Merge branch 'PHP-8.2' into PHP-8.3 2024-11-08 16:48:25 +01:00
Jakub Zelenka
065bde1e13
Fix GH-16432: PHP-FPM 8.2 SIGSEGV in fpm_get_status 2024-11-08 16:44:05 +01:00
Ilija Tovilo
3b609ab0e4
[skip ci] Fix asan ubuntu image condition in nightly
This was meant only for master. 8.4 should still use 22.04.
2024-11-08 13:56:56 +01:00
David Carlier
9216436186
Merge branch 'PHP-8.4' 2024-11-08 12:28:44 +00:00
David Carlier
5252e8b511
Merge branch 'PHP-8.3' into PHP-8.4 2024-11-08 12:27:35 +00:00
David Carlier
61b4e67fb1
Merge branch 'PHP-8.2' into PHP-8.3 2024-11-08 12:27:24 +00:00
David Carlier
875a9dc4c4
Fix introduced leaks from GH-15715.
Choosing here to shrink the requested allocation to its max value.
2024-11-08 12:27:03 +00:00
Gina Peter Banyard
f3b150a6a6 ext/standard: Move array_walk(_recursive)() tests into subfolder 2024-11-08 07:04:00 +00:00
Gina Peter Banyard
f011684206 ext/standard: Split sort tests that contain escape sequences 2024-11-08 07:04:00 +00:00
Gina Peter Banyard
d8a63a38c6 ext/standard: Move sort() related tests into subfolder 2024-11-08 07:04:00 +00:00
Christoph M. Becker
c1bf3acf44
Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix rename_variation12*.phpt parallel test conflicts
2024-11-08 00:26:52 +01:00
Christoph M. Becker
e68970d455
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix rename_variation12*.phpt parallel test conflicts
2024-11-08 00:26:19 +01:00
Christoph M. Becker
5f5d2c04c3
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix rename_variation12*.phpt parallel test conflicts
2024-11-08 00:25:24 +01:00
Christoph M. Becker
03eeec16f0
Fix rename_variation12*.phpt parallel test conflicts
For rename_variation12.phpt this is actually not necessary, since there
is no rename_variation11.phpt, but we still fix it to be in sync with
rename_variation12-win32.phpt which actually is prone to parallel
conflicts.

(cherry picked from commit d4263ddc40)
2024-11-08 00:24:49 +01:00
David Carlier
600da8cffc
Merge branch 'PHP-8.4' 2024-11-07 22:53:08 +00:00
David Carlier
7477c1b4ab
Merge branch 'PHP-8.3' into PHP-8.4 2024-11-07 22:52:57 +00:00
David Carlier
3f28644fff
Merge branch 'PHP-8.2' into PHP-8.3 2024-11-07 22:52:19 +00:00
David Carlier
e74e66e3f7
Fix oss-fuzz report triggered by GH-15712 commit.
It triggered allocation overflow which, even fixed, in turn gives memory
leak on 32 bits but the allocator relies on signed integers.

close GH-15915
2024-11-07 22:51:05 +00:00
Ilija Tovilo
93c9c7c5c1
[skip ci] Update to ubuntu 24.04 for asan in nightly 2024-11-07 22:05:54 +01:00
Ilija Tovilo
fb257ee83c
Upgrade master to Ubuntu 24.04 (GH-16704) 2024-11-07 16:32:45 +01:00
Arnaud Le Blanc
40997c2c62
[ci skip] NEWS for GH-16702 2024-11-07 15:56:45 +01:00
Michael Orlitzky
4dc0b40f42 ext/standard/crypt.c: handle musl failure tokens
Musl's crypt() returns "*" to indicate failure in contrast with the
"*0" returned by PHP/libxcrypt. This causes test failures, but more
importantly, is a pretty silly thing to expect the user to know.
This commit catches the musl value and turns it into "*0".
2024-11-07 15:54:50 +01:00
Michael Orlitzky
f5d2e7b779 ext/standard/tests/crypt/des_fallback_invalid_salt.phpt: less valid salt
Musl's crypt() implementation of DES tries to handle invalid salts and
can make this test fail because it returns an answer and not an
error. Even musl however will reject a salt with a ':' in it, so we
can make this test cross-platform by supplying an even less valid
salt.
2024-11-07 15:54:50 +01:00
Michael Orlitzky
8a712003aa ext/standard/tests/strings/crypt_sha256.phpt: fix on musl
Among other things, this test tries to run too few and too many rounds
of SHA256. In both cases, it is expecting an error, but that behavior
depends on the implementation:

  * PHP's own implementation raises an error in either case
  * libxcrypt raises an error in either case
  * Older versions of glibc would clamp the number of rounds
    to a valid amount (newer versions don't have libcrypt)
  * Musl libc clamps values that are too low, but raises an error
    for values that are too high

If PHP is built with --with-external-libcrypt, the musl implementation
above can be used. Even if libxcrypt is installed, PHP will notice
that no additional -lfoo flags are needed to use the crypt
implementation in musl. To pass on such a system, we must not test
for the "too few rounds" behavior.
2024-11-07 15:54:50 +01:00
Ilija Tovilo
452c5ac989
Fix incorrect filename of dl()'d internal consts (#16721)
We should only attempt to fetch the current filename for user constants. dl()
may attempt to register internal constants after execution has already started,
thus incorrectly linking the user file invoking dl().

See GH-16663
2024-11-07 14:53:12 +01:00
Christoph M. Becker
5c76ef78cb
Fix GH-10992: Improper long path support for relative paths
Relative paths are passed to the ioutils APIs, these are not properly
converted to long paths.  If the path length already exceeds a given
threshold (usually 259 characters, but only 247 for `mkdir()`), the
long path prefix is prepended, resulting in an invalid path, since long
paths have to be absolute.  If the path length does not exceed that
threshold, no conversion to a long path is done, although that may be
necessary.

Thus we take the path length of the current working directory into
account when checking the threshold, and prepend it to the filename if
necessary.

Since this is only relevant for NTS builds, and using the current
working directory of the process would be erroneous for ZTS builds, we
skip the new code for ZTS builds.

Closes GH-16687.
2024-11-07 13:34:41 +01:00