Commit Graph

51838 Commits

Author SHA1 Message Date
Nikita Popov
5fa6dcd972 Fixed bug #78759
Handle INDIRECT values in array.
2019-11-07 11:15:29 +01:00
Nikita Popov
f494a36618 Remove bogus skipifs in get_browser tests
We provide this file, it should be readable.

These checks no longer work, since --INI-- values are no longer
passed to --SKIPIF--.
2019-11-06 17:48:52 +01:00
Nikita Popov
3e41ade638 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #78775
2019-11-05 12:16:09 +01:00
Nikita Popov
747cb46244 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #78775
2019-11-05 12:15:44 +01:00
Nikita Popov
4f984a2fdb Fixed bug #78775
Clear the OpenSSL error queue before performing SSL stream operations.
As we don't control all code that could possibly be using OpenSSL,
we can't rely on the error queue being empty.
2019-11-05 12:13:46 +01:00
Christoph M. Becker
85874af404 Remove obsolete oniguruma.patch
The proper `SIZEOF_SIZE_T` definitions are available as of Oniguruma
6.9.1; no more need to patch.
2019-11-05 10:16:22 +01:00
Adam Saponara
6c9821a531 Remove dead code ext/mysqlnd/mysqlnd_net.c.
I believe this code has been dead since 05c5e05 (2015) now replaced
by `ext/mysqlnd/mysqlnd_vio.c`.

Closes GH-4888.
2019-11-04 21:36:13 +01:00
Fabien Villepinte
6545f656be Add a test for ReflectionClass:getInterfaceNames()
The method was not tested against a class without interface.
2019-11-04 13:51:40 +01:00
Christoph M. Becker
00c9c480eb Make test more robust
Time flies, so obviously the reported uptime may differ a bit (as
already occasionally noticed on CI); we cater to that by allowing a
delay of up to one second.
2019-11-04 12:22:04 +01:00
Nikita Popov
c9abfaec6b Fixed bug #78774
The string held by the zend_type may be released if the property
type gets resolved to a CE. I initially wanted to fix this by
storing a zend_type* instead (so the property type resolution
propagates to the ReflectionType), but decided against this in
light of upcoming union types support, where we also need to
represent parts of the union, and will not have a single zend_type*
we can reference.
2019-11-04 11:04:02 +01:00
Simonov Denis
e84042cc72 Print Client Library Version in phpinfo 2019-11-02 10:19:15 +01:00
Fabien Villepinte
a0d58abb79 Fix conflicts between tests with obscure filenames
For non-windows tests
2019-11-01 12:33:36 +01:00
Fabien Villepinte
5367f36da7 Fix conflicts between tests with obscure filenames 2019-11-01 12:24:38 +01:00
Christoph M. Becker
db14b78099 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix test cases for libxml2 2.9.10
2019-10-31 16:09:38 +01:00
Christoph M. Becker
e175a0a1c8 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix test cases for libxml2 2.9.10
2019-10-31 16:08:38 +01:00
Christoph M. Becker
e29922f054 Fix test cases for libxml2 2.9.10
Since the error reporting has been slightly changed, we have to adapt
the two affected test cases.
2019-10-31 16:07:34 +01:00
Christoph M. Becker
0055f1e3dc Fix #78761: Zend memory heap corruption with preload and casting
We have to reset `FFI_G(persistent)` back to zero when preloading has
finished.
2019-10-30 19:49:39 +01:00
Christoph M. Becker
1e2d3d58a8 Fix #78762: Failing FFI::cast() may leak memory
We have to release objects when we're done with them.
2019-10-30 17:21:58 +01:00
Tyson Andre
447f07cd28 Optimize creation of empty arrays in json_decode
Use the shared empty array from ZVAL_EMPTY_ARRAY

For code that created an 10 arrays of 100000 empty arrays
(has the same result with `$assoc=true` and `{}`)

- This is the worst-case comparison, but I'd expect 0-length arrays to be fairly
  common in regular data for json_decode
- The parser implementation was using function pointers so that third party
  extension developers could reuse the json parser for their own
  data structures, etc. (I think).

  This PR is meant to let those third party extensions continue working
  without changes.

Before this patch: In 0.126 seconds: added 97.99 MiB
After this patch:  In 0.096 seconds: added 41.99 MiB

```php
<?php
$json = '[' . str_repeat('[],', 100000) . "null]";
$start_memory = memory_get_usage();
$start_time = microtime(true);
$result = [];
for ($i = 0; $i < 10; $i++) {
    $result[] = json_decode($json);
}
$end_memory = memory_get_usage();
$end_time = microtime(true);
// Before this patch: In 0.126 seconds: added 97.99 MiB
// After this patch:  In 0.096 seconds: added 41.99 MiB
printf("In %.3f seconds: added %.2f MiB\n", $end_time - $start_time, ($end_memory - $start_memory)/1000000);

// For objects
$json = '[' . str_repeat('{},', 100000) . "null]";
$start_memory = memory_get_usage();
$start_time = microtime(true);
for ($i = 0; $i < 10; $i++) {
    $result[] = json_decode($json, true);
}
$end_memory = memory_get_usage();
$end_time = microtime(true);
// Before this patch: In 0.126 seconds: added 97.99 MiB
// After this patch:  In 0.096 seconds: added 41.99 MiB
printf("In %.3f seconds: added %.2f MiB (objects decoded as arrays) \n", $end_time - $start_time, ($end_memory - $start_memory)/1000000);
```

Closes GH-4861.
2019-10-30 11:06:46 +01:00
Christoph M. Becker
22523958f4 Skip test case on non Windows platforms 2019-10-29 10:05:31 +01:00
Christoph M. Becker
bedbecf56d Implement #78270: Support __vectorcall convention with FFI
To work around the limitation of the current rudimentary vectorcall
support in our patched libffi, we forbid yet unsupported declarations,
i.e. float/double parameters at certain positions (SIMD vector types
and HVA types are not supported anyway).
2019-10-29 08:57:43 +01:00
Stanislav Malyshev
53b1d76144 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix libmagic buffer overflow issue (CVE-2019-18218)
  bump version
  set versions for release
2019-10-28 20:47:50 -07:00
Stanislav Malyshev
8c2b3b0568 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix libmagic buffer overflow issue (CVE-2019-18218)
  bump version
  set versions for release
2019-10-28 20:47:44 -07:00
Stanislav Malyshev
2bdb13a1f7 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix libmagic buffer overflow issue (CVE-2019-18218)
  bump version
  set versions for release
2019-10-28 20:47:30 -07:00
Simonov Denis
3fb42a382c Add support for Interbase 1 dialect 2019-10-28 16:40:51 +01:00
Christoph M. Becker
9e4c5db733 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78751: Serialising DatePeriod converts DateTimeImmutable
2019-10-28 13:09:24 +01:00
Christoph M. Becker
736cd93ef5 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78751: Serialising DatePeriod converts DateTimeImmutable
2019-10-28 13:08:34 +01:00
Christoph M. Becker
89c327f884 Fix #78751: Serialising DatePeriod converts DateTimeImmutable
When getting the properties of a DatePeriod instance we have to retain
the proper classes, and when restoring a DatePeriod instance we have to
cater to DateTimeImmutable instances as well.
2019-10-28 13:07:28 +01:00
Stanislav Malyshev
469820048d Fix libmagic buffer overflow issue (CVE-2019-18218)
Ported from 46a8443f76
2019-10-27 16:30:38 -07:00
Nikita Popov
43dc7da8e3 Try one more FD in ext/standard/tests/file/php_fd_wrapper_04.phpt
For some reason FD 120 seems to exist on macos quite often, while
FD 12 did not... Let's try an even larger number, otherwise we
should just drop this test.
2019-10-27 09:35:57 +01:00
Fabien Villepinte
601aef3468 Replace EXPECTF by EXPECT
In ext/dom all the tests with a EXPECTF section
starting by "Fatal error: Uncaught" have been updated
to use the faster EXPECT
2019-10-26 16:05:02 +02:00
Nikita Popov
f1848a4b3f Fix bug #78226: Don't call __set() on uninitialized typed properties
Assigning to an uninitialized typed property will no longer trigger
a call to __set(). However, calls to __set() are still triggered if
the property is explicitly unset().

This gives us both the behavior people generally expect, and still
allows ORMs to do lazy initialization by unsetting properties.

For PHP 8, we should fine a way to forbid unsetting of declared
properties entirely, and provide a different way to achieve lazy
initialization.
2019-10-25 16:31:45 +02:00
Nikita Popov
4d8541debb Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #78747
2019-10-25 12:50:26 +02:00
Nikita Popov
74699533e5 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #78747
2019-10-25 12:50:12 +02:00
Nikita Popov
5249993814 Fixed bug #78747 2019-10-25 12:47:18 +02:00
Nikita Popov
6aece7be0a Optimize VERIFY_RETURN_TYPE for TMP operands as well
Only exclude CONST operands, which use a different instruction
format (they have a return operand).
2019-10-25 11:37:19 +02:00
Nikita Popov
f07565b0eb Check class linking in VERIFY_RETURN_TYPE optimization
instanceof_function() requires linked classes. I'm not reusing
unlinked_instanceof() here, because it performs class loading,
which wouldn't be right here, I think.
2019-10-25 11:24:32 +02:00
Nikita Popov
93a9b56c90 Skip IntlTimeZone::getOffset() error tests on non-x86
I'm not totally sure, but I have a strong suspicion that the fact
that this produces an error is an artifact of undefined cast behavior
(which will yield INDVAL on x86 but saturate on ARM). INF seems to
be the only value that results in an error even on x86 (variations
like -INF or NAN succeed).

It might make sense to just remove this test entirely, but for now
let's skip it on non-x86.
2019-10-24 15:26:11 +02:00
Nikita Popov
edf7346810 Skip large ftruncate test if large files not supported 2019-10-24 14:46:49 +02:00
Nikita Popov
6aa6d70e9d Don't test "blocks" in lstat_stat_variation7.phpt
This stat property seems to be somewhat unreliable depending on the
filesystem. On Travis ARM64 CI a much larger payload is required
to get this value to increase.
2019-10-24 14:46:41 +02:00
Nikita Popov
8fd30aae16 Increase FD used in php://fd test 2019-10-24 14:46:34 +02:00
Nikita Popov
a3469146d4 Use posix_getuid() to check for root in pcntl_setpriority() test
Using SUDO_USER doesn't seem to work on Travis ARM CI -- I guess
that sudo might be in use without the target being root.
2019-10-24 14:46:25 +02:00
Dmitry Stogov
fea8c5481b Added suppot for glob() wildcard matching in ffi.preload directive 2019-10-24 07:40:07 +02:00
Dmitry Stogov
c744531fff Ignore ZEND_FFI_TYPE_OWNED flag 2019-10-23 19:50:58 +03:00
Nikita Popov
5f13eff4a2 Fix aarch64 crc32 implementation
RETVAL vs RETURN mixup resulted in the fallback implementation
running as well.
2019-10-23 17:41:59 +02:00
Florian Engelhardt
1eae77221e Added missing call to ZipArchive::close() 2019-10-23 10:44:26 +02:00
Remi Collet
dcd772325d add new ffi.preload option in php.ini and display ini entries in MINFO 2019-10-23 07:49:13 +02:00
Christoph M. Becker
598bf7f5d5 Fix typo 2019-10-22 17:53:34 +02:00
Dmitry Stogov
1417352dda Allow loading FFI bindings through ffi.preload directive 2019-10-22 17:52:56 +03:00
Christoph M. Becker
1c9bfcb6a7 Fix #78716: Function name mangling is wrong for some parameter types
We have to cater to function parameter alignment when calculating the
parameter size.
2019-10-22 11:38:58 +02:00
Fabien Villepinte
7ce85c34ff Revert "Add tests for ReflectionZendExtension"
This reverts commit 4194e0415b.

There were already tests for this class.
2019-10-21 21:31:36 +02:00
Fabien Villepinte
4194e0415b Add tests for ReflectionZendExtension 2019-10-21 21:17:16 +02:00
Dmitry Stogov
05c5e5dfde Fixed bug #78512 (Cannot make preload work) 2019-10-21 14:52:26 +03:00
Joe Watkins
1ac961bea8
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug #78697: inaccurate error message
2019-10-21 09:24:41 +02:00
Joe Watkins
1c9b62fbd4
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #78697: inaccurate error message
2019-10-21 09:23:26 +02:00
Fabien Villepinte
bea2ff88c9
Fix bug #78697: inaccurate error message 2019-10-21 09:22:09 +02:00
Stanislav Malyshev
d517c559fc Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78633: Heap buffer overflow (read) in mb_eregi
2019-10-20 23:20:16 -07:00
Christoph M. Becker
4f50d58cab Fix #78633: Heap buffer overflow (read) in mb_eregi
We backport kkos/oniguruma@15c4228aa2.
2019-10-20 22:47:38 -07:00
Fabien Villepinte
4b3e041f5b Fix proto of enchant_broker_list_dicts() 2019-10-19 22:11:34 +02:00
Tyson Andre
38f388fba4 Fix miscellaneous typos in docs 2019-10-19 19:19:28 +02:00
Fabien Villepinte
550a2df043 Add tests for DOMEntityReference 2019-10-19 15:42:16 +02:00
Christoph M. Becker
26635ed71a Fix #78684: PCRE bug72463_2 test is sending emails on Linux
This test is not supposed to run on non Windows systems; otherwise it
would try to send an email.
2019-10-19 12:59:32 +02:00
Christoph M. Becker
ee6a71ca73 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78694: Appending to a variant array causes segfault
2019-10-19 11:51:05 +02:00
Christoph M. Becker
ce035dc4a0 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78694: Appending to a variant array causes segfault
2019-10-19 11:49:18 +02:00
Christoph M. Becker
45a7723267 Fix #78694: Appending to a variant array causes segfault
`write_dimension` object handlers have to be able to handle `NULL`
`offset`s; for now we simply throw an exception instead of following
the `NULL` pointer.
2019-10-19 11:47:00 +02:00
Nikita Popov
650115c827 Improve exif tag name fetching 2019-10-18 16:55:05 +02:00
Nikita Popov
56e3e6f135 Implement a cache for exif tag name lookups 2019-10-18 16:54:56 +02:00
Nikita Popov
e5324a2484 Limit the amount of errors generated during exif parsing
Emitting errors is fairly expensive, to the point that parsing
a file with a huge number of invalid tags can take seconds.
Generating ten thousand errors is unlikely to help anybody, but
constitutes a potential DOS vector.
2019-10-18 16:54:49 +02:00
Christoph M. Becker
81806db90b Fix test case
Cf. <https://github.com/php/php-src/pull/4687>.
2019-10-18 16:23:56 +02:00
Christoph M. Becker
197568d634 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #70153 \DateInterval incorrectly unserialized
2019-10-18 15:33:25 +02:00
Christoph M. Becker
c7c7ab53ac Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #70153 \DateInterval incorrectly unserialized
2019-10-18 15:32:08 +02:00
m.yakunin
d2cde0bfd3 Fix #70153 \DateInterval incorrectly unserialized
Added a separate macro for reading 'days' property, so that bool(false)
is correctly converted to the proper internal representation.
2019-10-18 15:31:14 +02:00
Alex Porto dos Santos
a6a2d167d8 Update array access syntax deprecated
Update array access syntax deprecated in line 175 and 204
Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/alex/php/hello/ext_skel.php on line 175
Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/alex/php/hello/ext_skel.php on line 204
2019-10-17 23:39:55 +02:00
Fabien Villepinte
8b160f530c Change port to avoid collision with others tests
The 64321 port is already used with the ext/openssl tests.
2019-10-16 20:50:54 +02:00
Derick Rethans
3f7cc8361c Merge branch 'PHP-7.3' into PHP-7.4 2019-10-15 21:00:57 +01:00
Derick Rethans
3725a446ba Import timelib version 2018.03 2019-10-15 21:00:39 +01:00
Sara Golemon
15d7cd9e18
Silence undefined index warning when openssl not available. 2019-10-15 15:37:56 -04:00
Christoph M. Becker
8e06504e94 Prevent parallel testing conflicts
disk_free_space_basic.phpt already uses this directory, so we rename
it.
2019-10-15 16:29:46 +02:00
Joe Watkins
042e3b227e
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix checksum calculation for opcache
2019-10-14 16:50:23 +02:00
Joe Watkins
22ac57b064
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix checksum calculation for opcache
2019-10-14 16:49:48 +02:00
Mitch Hagstrand
e2a6bf482f
Fix checksum calculation for opcache 2019-10-14 16:46:42 +02:00
Nikita Popov
641f9615cc Fix handling of overflowing invalid octal in tokenizer
If token_get_all() is used, we still need to correctly distinguish
LNUMBER vs DNUMBER here for backwards compatibility.
2019-10-14 16:36:27 +02:00
Christoph M. Becker
f6bd5dcbe9 Fix test case
`MSG_EOR` and `MSG_EOF` are not necessarily defined, in which case the
test would fail.
2019-10-12 16:28:57 +02:00
Christoph M. Becker
c10d3d3a35 Fix potential heap corruption
`tmp` is allocated by `malloc()`, so we must not `LocalFree()` it.
2019-10-12 16:16:14 +02:00
Christoph M. Becker
586f8515d5 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78665: Multicasting may leak memory
2019-10-12 14:46:10 +02:00
Christoph M. Becker
7439d48bea Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78665: Multicasting may leak memory
2019-10-12 14:44:55 +02:00
Christoph M. Becker
900bdcbd03 Fix #78665: Multicasting may leak memory 2019-10-12 14:43:43 +02:00
Remi Collet
5a024d2c5b Fix #78662: stream_write bad error detection 2019-10-11 13:36:58 +02:00
Fabien Villepinte
8b8c226dbf Replace port already used
Closes GH-4811.
2019-10-11 10:57:09 +02:00
Nikita Popov
e4aac082a2 Merge branch 'PHP-7.3' into PHP-7.4 2019-10-10 16:14:52 +02:00
Nikita Popov
74ac3dd6e2 Merge branch 'PHP-7.2' into PHP-7.3 2019-10-10 16:14:37 +02:00
Nikita Popov
46561dab6a Fix leak in phar open 2019-10-10 16:14:21 +02:00
Nikita Popov
5b44560dfc Merge branch 'PHP-7.3' into PHP-7.4 2019-10-09 17:33:52 +02:00
Nikita Popov
a0163417ef Merge branch 'PHP-7.2' into PHP-7.3 2019-10-09 17:33:44 +02:00
Nikita Popov
daf1fc6e31 Avoid float to int cast UB in exif 2019-10-09 17:33:29 +02:00
Nikita Popov
a4d7f4c3e1 Merge branch 'PHP-7.3' into PHP-7.4 2019-10-09 14:58:10 +02:00
Nikita Popov
cbf589b17c Merge branch 'PHP-7.2' into PHP-7.3 2019-10-09 14:58:01 +02:00
Nikita Popov
d6ca174d5b Remove redundant components < 0 check
components is an unsigned number, it cannot be smaller than zero.
2019-10-09 14:57:24 +02:00
Christoph M. Becker
4625fa181f Fix #78650: new COM Crash
As of PHP 7.4.0, the `get_property_ptr_ptr` handler is mandatory; we
implement it to always return `NULL`, which is equivalent to not
setting the handler in former versions.

We add a portable and faster test case than what has been presented in
the bug ticket.
2019-10-09 14:09:02 +02:00
Fabien Villepinte
8b5c351154 Avoid file clash in root_check skipifs
Extract root check into skipif_root.inc to share this commonly
repeated logic.

Closes GH-4779.
2019-10-08 18:20:13 +02:00
Nikita Popov
68b26ff8cf Merge branch 'PHP-7.3' into PHP-7.4 2019-10-08 16:14:06 +02:00
Nikita Popov
736af5f660 Merge branch 'PHP-7.2' into PHP-7.3 2019-10-08 16:13:17 +02:00
Sergei Turchanov
a8f60ac9dd Add pcre_get_compiled_regex_cache_ex() with local_aware flag
A new function `pcre_get_compiled_regex_cache_ex()` is introduced,
which allows to compile regexp pattern using the "C" locale instead
of a current locale.

This will be needed to replace setlocale() usage in fileinfo,
which is not thread-safe.
2019-10-08 16:11:55 +02:00
Christoph M. Becker
d1de1777e9 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Add missing SKIPIFs in exif tests
2019-10-08 14:12:50 +02:00
Christoph M. Becker
9fd555f99e Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Add missing SKIPIFs in exif tests
2019-10-08 14:12:12 +02:00
Fabien Villepinte
46894580b0 Add missing SKIPIFs in exif tests 2019-10-08 14:11:32 +02:00
Nikita Popov
196f9697ef Merge branch 'PHP-7.3' into PHP-7.4 2019-10-08 12:35:35 +02:00
Nikita Popov
2fdd142f99 Check for exception after applying stream filters
This makes the stream opening actually fail, and avoids assertion
failures when we tokenize with EG(exception) set.

Also avoid throwing an additional warning after an exception has
already been thrown.
2019-10-08 12:32:57 +02:00
Christoph M. Becker
346be2cf59 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78642: Wrong libiconv version displayed
2019-10-08 12:10:58 +02:00
Christoph M. Becker
d6fdc17f7f Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78642: Wrong libiconv version displayed
2019-10-08 12:10:06 +02:00
Christoph M. Becker
195c2008e8 Fix #78642: Wrong libiconv version displayed
The high byte of `_libiconv_version` specifies the major version; the
low byte the minor version.
2019-10-08 12:09:11 +02:00
Remi Collet
e1362b3cf0 add librt for opcache 2019-10-08 10:48:10 +02:00
Christoph M. Becker
88e0d88897 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78641: addGlob can modify given remove_path value
2019-10-08 09:49:46 +02:00
Christoph M. Becker
11654fdfa6 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78641: addGlob can modify given remove_path value
2019-10-08 09:48:59 +02:00
Christoph M. Becker
fd3118ffb0 Fix #78641: addGlob can modify given remove_path value
`remove_path` points to the given string, so we must not modify it.
Instead we use a duplicate, if we need the modification.

We may want to switch to `zend_string`s in master.
2019-10-08 09:45:05 +02:00
Nikita Popov
3c38d20882 Merge branch 'PHP-7.3' into PHP-7.4 2019-10-07 17:52:41 +02:00
Nikita Popov
8a03fd6a5e Merge branch 'PHP-7.2' into PHP-7.3 2019-10-07 17:52:35 +02:00
Nikita Popov
19e6abebc7 Check for object_init_ex() failure in user filter factory 2019-10-07 17:52:29 +02:00
Nikita Popov
638ac2efc4 Merge branch 'PHP-7.3' into PHP-7.4 2019-10-07 16:44:39 +02:00
Nikita Popov
2624c9a505 Merge branch 'PHP-7.2' into PHP-7.3 2019-10-07 16:44:31 +02:00
Nikita Popov
7d19668f60 Set session.gc_probability=0 in bug78624.phpt
We only want to test manually triggered session GC.
Avoid spurious output due to automatic GC.
2019-10-07 16:43:19 +02:00
Nikita Popov
f085bddb51 Fix number of required arguments in arginfo
* pack() only requires one argument
* stream_context_set_option() only requires two arguments
* ReflectionMethod::getClosure() accepts no args for static methods
* DOMDocument::createProcessingInstruction() only requires one arg
* DOMImplementation::createDocument() only requires two arguments
* DOMDocument::importNode() only requires one arg
* mysql_get_client_version() doesn't accept any args,
  despite what the docs say...
2019-10-07 16:32:11 +02:00
Nikita Popov
1dbf80bcc2 Merge branch 'PHP-7.3' into PHP-7.4 2019-10-07 13:24:16 +02:00
Nikita Popov
ab61d5caf9 Backport fix for uaf during pcre jit fallback
Backports parts of https://vcs.pcre.org/pcre2?view=revision&revision=1175
fixing https://bugs.exim.org/show_bug.cgi?id=2453.
2019-10-07 13:23:56 +02:00
Nikita Popov
81d95c4c3c Don't test default serialize max_depth
The default depth is large enough to cause stack overflows in
msan builds, though apparently only on old clang versions. Avoiding
a stack overflow there requires making the depth *much* smaller,
less than 1000. As I don't think that's reasonable for all the other
setups where 4k works fine, I'm just dropping this part of the test.
2019-10-07 12:43:12 +02:00
Nikita Popov
5b067163be Limit retry_limit test to oniguruma >= 6.9.3
This test is somewhat fragile in that it depends on how well a
particular regex is optimized. Apparently on 6.9.1 this regex
would hit the default retry_limit of 1000000 already. I'm limiting
this to 6.9.3 because that's the version that works for me.
2019-10-07 10:49:34 +02:00
Christoph M. Becker
b142e8a4b3 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78623: Regression caused by "SP call yields additional empty result set"
2019-10-07 09:18:46 +02:00
Christoph M. Becker
3322c78a88 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78623: Regression caused by "SP call yields additional empty result set"
2019-10-07 09:17:29 +02:00
Christoph M. Becker
114c03b9a6 Fix #78623: Regression caused by "SP call yields additional empty result set"
This reverts commit 41a4379cb4.
2019-10-07 09:15:51 +02:00
Nikita Popov
6623e7ac51 Add support for mbstring.regex_retry_limit
This is very similar to the existing mbstring.regex_stack_limit,
but for backtracking. The default value matches pcre.backtrack_limit.
Only used on libonig >= 2.8.0.
2019-10-06 10:06:33 +02:00
Nikita Popov
01b3cc4dee Merge branch 'PHP-7.3' into PHP-7.4 2019-10-04 16:04:34 +02:00
Nikita Popov
1d6e9da743 Improve diagnostic on PCRE JIT mmap failure
Print a more informative message that indicates that this is
likely a permission issue, and also indicate that pcre.jit=0
can be used to work around it.

Also automatically disable the JIT, so that this message is
only shown once.

See bug #78630.
2019-10-04 16:03:38 +02:00
Christoph M. Becker
884b780667 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Split intl tests for ICU 65
2019-10-04 13:54:49 +02:00
Christoph M. Becker
1ce8c805e2 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Split intl tests for ICU 65
2019-10-04 13:53:58 +02:00
Christoph M. Becker
545412a6cd Split intl tests for ICU 65 2019-10-04 13:53:22 +02:00
Nikita Popov
ca652aafa8 Fixed bug #78632
I'm going for a very conservative fix here, where the previous
logic is restored for the case where an object is passed to
method_exists(). We might want to check against EG(scope) instead,
but this seems like a safer choice.

This means that behavior in PHP 7.4 changes only for
method_exists('C', 'privateMethodNotOnC'), which should be sensible.
2019-10-04 12:41:49 +02:00
Christoph M. Becker
6627f782d6 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78620: Out of memory error
2019-10-04 09:11:18 +02:00
Christoph M. Becker
cf183a5e2c Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78620: Out of memory error
2019-10-04 09:09:39 +02:00
Christoph M. Becker
abaf9a76dc Fix #78620: Out of memory error
The integer addition in `ZEND_MM_ALIGNED_SIZE_EX` can overflow, what we
have to catch early.
2019-10-04 09:08:01 +02:00
Joe Watkins
74ca3a5cad
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  fix #78624: session_gc return value for user defined session handlers
2019-10-04 06:16:18 +02:00
Joe Watkins
f45eb353d1
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  fix #78624: session_gc return value for user defined session handlers
2019-10-04 06:12:29 +02:00
Brent Shaffer
a6d219630c
fix #78624: session_gc return value for user defined session handlers 2019-10-04 06:12:02 +02:00
Joe Watkins
5a8e7b95a1
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug #76809 (SSL settings aren't respected when persistent connection is reused)
2019-10-03 07:13:15 +02:00
Joe Watkins
f4d078b1c7
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #76809 (SSL settings aren't respected when persistent connection is reused)
2019-10-03 06:57:05 +02:00
Fábio Souto
9a2b42a5c1
Fix bug #76809 (SSL settings aren't respected when persistent connection is reused) 2019-10-03 06:56:21 +02:00
Joe Watkins
de83036f13
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #76859 stream_get_line skips data if used with data-generating filter
2019-10-03 06:51:56 +02:00
Joe Watkins
5b1bb23edf
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #76859 stream_get_line skips data if used with data-generating filter
2019-10-03 06:51:10 +02:00
Konstantin Kopachev
05560b67bc
Fix #76859 stream_get_line skips data if used with data-generating filter
stream_get-line repeatedly calls php_stream_fill_read_buffer until
enough data is accumulated in buffer. However, when stream contains
filters attached to it, then each call to fill buffer essentially
resets buffer read/write pointers and new data is written over old.
This causes stream_get_line to skip parts of data from stream
This patch fixes such behavior, so fill buffer call will append.
2019-10-03 06:50:43 +02:00
Derick Rethans
a46bdcb631 Updated to version 2019.3 (2019c) 2019-10-02 23:39:11 +01:00
Derick Rethans
0505fbf2e5 Updated to version 2019.3 (2019c) 2019-10-02 23:39:09 +01:00