Commit Graph

117326 Commits

Author SHA1 Message Date
Nikita Popov
73b31302ed Extract calculation of offset from pointer 2020-01-24 11:15:58 +01:00
Nikita Popov
9e0e8d5650 Handle mb_str(r)ipos offset consistently as well 2020-01-24 10:54:20 +01:00
Nikita Popov
ce6169832f Move offset error checking into mbfl_strpos
This avoids calculating the full length only in order to validate
the offset, as mbfl_strpos needs to find the offset internally
anyway.
2020-01-24 10:50:02 +01:00
Nikita Popov
0f6d223ddb Add #defines for mbfl_strpos error conditions 2020-01-24 10:02:41 +01:00
Nikita Popov
e72bf63691 Allow variadic arguments to replace non-variadic ones
Any number of arguments can be replaced by a variadic one, so
long as the variadic argument is compatible (in the sense of
contravariance) with the subsumed arguments.

In particular this means that function(...$args) becomes a
near-universal signature: It is compatible with any function
signature that does not accept parameters by-reference.

This also fixes bug #70839, which describes a special case.

Closes GH-5059.
2020-01-23 15:23:31 +01:00
Nikita Popov
4da7e67d12 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix bug76348.phpt
2020-01-23 15:09:59 +01:00
Nikita Popov
47b1a58e96 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug76348.phpt
2020-01-23 15:09:54 +01:00
Nikita Popov
2c2cbbbf55 Fix bug76348.phpt
Adjust for URL change in XSD file and mark as online test.

Is it possible for use to store http://x-road.eu/xsd/xroad.xsd
locally instead? Do relative file system paths work here?
I'm not familiar with this.
2020-01-23 15:08:20 +01:00
Nikita Popov
a2e4392439 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #78902
  Add unit test for bug #78902
2020-01-23 14:58:15 +01:00
Nikita Popov
6489e29831 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #78902
  Add unit test for bug #78902
2020-01-23 14:58:10 +01:00
liudaixiao
67421a780d Fixed bug #78902 2020-01-23 14:57:16 +01:00
Léopold Jacquot
f720fb1e21 Add unit test for bug #78902 2020-01-23 14:53:28 +01:00
Nikita Popov
60f62359a0 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79151
2020-01-23 14:21:21 +01:00
Nikita Popov
3f020aef85 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #79151
2020-01-23 14:21:14 +01:00
Nikita Popov
db9776c53c Fixed bug #79151
Make sure we also NULL out next/prev of the removed element on
pop/shift. This only matter is that element is still being referenced
by an iterator.
2020-01-23 14:20:26 +01:00
George Peter Banyard
2b5fb76de6 Apply custom format/length modifier removal to spprintf
This mimicks the changes made to the custom snprintf implementation
by removing the custom 'v' format and custom 'I' length modifier
from the spprintf implementation.

Closes GH-5108
2020-01-23 13:45:28 +01:00
Christoph M. Becker
28e650abf8 Revert "Merge branch 'PHP-7.4'"
This reverts commit 046dcfb531, due to
segfaults on Travis.  This needs to be investigated.
2020-01-23 13:12:16 +01:00
Nikita Popov
9c23a50939 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79155
2020-01-23 12:55:59 +01:00
Nikita Popov
2eb33818b6 Fixed bug #79155
Make sure we only unset the NULLABLE flag temporarily for class
resolution, as the same type may be compiled multiple types.
2020-01-23 12:54:14 +01:00
Christoph M. Becker
a93ce58862 Merge branch 'PHP-7.4'
* PHP-7.4:
  Enable UBSan in addition to ASan
2020-01-23 12:00:50 +01:00
Christoph M. Becker
ea3afcbae3 Enable UBSan in addition to ASan
UBSan is a useful tool, so we enable it for `--enable-sanitizer` in
addition to ASan.
2020-01-23 12:00:11 +01:00
Christoph M. Becker
046dcfb531 Merge branch 'PHP-7.4'
* PHP-7.4:
  Make MSVCRT memory leak checking usable for the test suite
2020-01-23 11:48:20 +01:00
Christoph M. Becker
4130fe437a Make MSVCRT memory leak checking usable for the test suite
While basic support for MSVCRT debugging has been added long
ago[1], the leak checking is not usable for the test suite, because we
are no longer calling `xmlCleanupParser()` on RSHUTDOWN of
ext/libxml[2], and therefore a few bogus leaks are reported whenever
ext/libxml is unloaded.

We therefore ignore memory leaks for this case.  We introduce
`ZEND_IGNORE_LEAKS_BEGIN()` and `ZEND_IGNORE_LEAKS_END()` to keep
those ignores better readable, and also because these *might* be
useful for other leak checkers as well.

We also explicitly free the `zend_handlers_table` and the `p5s` to
avoid spurious leak reports.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=d756e1db2324c1f4ab6f9b52e329959ce6a02bc3>
[2] <http://git.php.net/?p=php-src.git;a=commit;h=8742276eb3905eb97a585417000c7b8df85006d4>
2020-01-23 11:47:20 +01:00
Stanislav Malyshev
a698e36aa8 Merge branch 'PHP-7.4'
* PHP-7.4:
  More checks for php_strip_tags_ex
2020-01-22 23:06:35 -08:00
Stanislav Malyshev
984d508825 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  More checks for php_strip_tags_ex
2020-01-22 23:06:28 -08:00
Stanislav Malyshev
dd3c664f8f Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  More checks for php_strip_tags_ex
2020-01-22 22:41:56 -08:00
Stanislav Malyshev
2dc170e25d More checks for php_strip_tags_ex 2020-01-22 22:37:30 -08:00
George Peter Banyard
0719035f9d Add ValueError for invalid mode in count()
Closes GH-5106
2020-01-23 00:14:20 +01:00
Máté Kocsis
4281c2a989
Add UPGRADING notes [skip ci] 2020-01-22 23:24:50 +01:00
Benjamin Eberlei
7a52bf21d3 Add ReflectionProperty::getDefaultValue and ReflectionProperty::hasDefaultValue 2020-01-22 21:24:36 +01:00
Máté Kocsis
476636841f
Fix #78649 Provide ICU RELATIVE_ constants
Closes GH-5105
2020-01-22 19:59:40 +01:00
Christoph M. Becker
3987a31130 Merge branch 'PHP-7.4'
* PHP-7.4:
  Don't leak encoding_str
2020-01-22 11:17:20 +01:00
Christoph M. Becker
496e6a8f3a Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Don't leak encoding_str
2020-01-22 11:15:55 +01:00
Christoph M. Becker
f1bf4bf6eb Don't leak encoding_str 2020-01-22 11:15:16 +01:00
Christoph M. Becker
da9c206781 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79154: mb_convert_encoding() can modify $from_encoding
2020-01-22 10:32:06 +01:00
Christoph M. Becker
ab846173e2 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79154: mb_convert_encoding() can modify $from_encoding
2020-01-22 10:30:25 +01:00
Christoph M. Becker
9be31a582a Fix #79154: mb_convert_encoding() can modify $from_encoding
We must not modify arrays passed by value.
2020-01-22 10:28:07 +01:00
Christoph M. Becker
4327b113a0 Fix test expectation
As of PHP 8.0.0, array to string conversion raises a warning.
2020-01-22 10:21:55 +01:00
Christoph M. Becker
8f4d07bff0 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79149: SEGV in mb_convert_encoding with non-string encodings
2020-01-22 09:45:37 +01:00
Christoph M. Becker
94c9dc498f Fix #79149: SEGV in mb_convert_encoding with non-string encodings
We must not assume that `hash_entry` `IS_STRING`, but rather use
`encoding_str` which is guaranteed to be.
2020-01-22 09:43:51 +01:00
Remi Collet
fe8af59b6a Merge branch 'PHP-7.4'
* PHP-7.4:
  next will be 7.2.28
2020-01-22 09:18:13 +01:00
Remi Collet
d904be0880 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  next will be 7.2.28
2020-01-22 09:17:56 +01:00
Remi Collet
5a9475f4b9 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  next will be 7.2.28
2020-01-22 09:17:33 +01:00
Remi Collet
7e2bd95fa5 next will be 7.2.28 2020-01-22 09:17:00 +01:00
Tyson Andre
0c696577eb Use smaller batch size in run-tests.php when appropriate
- When valgrind is used, communication overhead is relatively small,
  so just use a batch size of 1.
- If this is running a small enough number of tests,
  reduce the batch size to give batches to more workers.
  (Previously, if there were 90 tests and -j8,
  only 3 of 8 workers would get a batch of size 32 or less.
  After this change, the batch size is 12 or less)

Closes GH-5098
2020-01-21 20:07:08 -05:00
Tyson Andre
549f55fc3f Don't start unnecessary processes with run-tests.php -j
If there's only 2 files to test, then only start 2 workers instead of N.

If there's only 1 file, then avoid parallelism entirely.
A separate option such as `--force-parallel` could be added
if this turns out to be something developers would want to do
when debugging test failures.
2020-01-21 20:05:06 -05:00
Nikita Popov
85ea04b747 Merge branch 'PHP-7.4'
* PHP-7.4:
  Avoid some @count() suppressions in run-tests.php
2020-01-21 18:50:14 +01:00
Nikita Popov
59b3ab827a Avoid some @count() suppressions in run-tests.php 2020-01-21 18:49:59 +01:00
Nikita Popov
06e193ba8d Merge branch 'PHP-7.4'
* PHP-7.4:
  Add sleep in FPM reload test
2020-01-21 17:56:43 +01:00
Nikita Popov
0aa09da486 Add sleep in FPM reload test
Explicitly mark the point where we have to wait.
2020-01-21 17:55:47 +01:00