Nikita Popov
72a5fdec2c
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed bug #78921
2019-12-13 16:38:42 +01:00
Nikita Popov
7e9e0937f3
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fixed bug #78921
2019-12-13 16:38:24 +01:00
Nikita Popov
621598eaa8
Fixed bug #78921
...
By resetting fake_scope during autoloading. We already do the same
when executing destructors.
2019-12-13 16:37:20 +01:00
Nikita Popov
9de4f87aca
Limit parse depth in mbstring fuzzer
...
The default depth of 4096 is large enough to cause optimize_node
stack overflows under asan. Reduce to 1024.
2019-12-13 16:09:28 +01:00
Nikita Popov
a40a69fdd0
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Introduce extra counter to avoid RTD key collisions
2019-12-13 11:05:41 +01:00
Nikita Popov
0f2cdbf214
Introduce extra counter to avoid RTD key collisions
...
Also generate a fatal error if a collision occurs in zend_compile.
This is not perfect, because collisions might still be introduced
via opcache, if one file is included multiple times during a request,
invalidate in the meantime and recompiled by different processes.
This still needs to be addressed, but this patch fixes the much
more common case of collisions occuring when opcache is not used.
Fixes bug #78903 .
2019-12-13 11:04:44 +01:00
Dylan T
01875e8b26
phar: fix offset*() prototypes
2019-12-13 10:41:50 +01:00
Máté Kocsis
e699b2865f
Fix exception message of implode()
2019-12-12 23:05:12 +01:00
Christoph M. Becker
4c5a178df8
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #78929 : plus signs in cookie values are converted to spaces
2019-12-12 14:22:32 +01:00
Kachalin Alexey
79376ab209
Fix #78929 : plus signs in cookie values are converted to spaces
...
We switch the cookie value parsing function from `php_url_decode()` to
`php_raw_url_decode()`, so that cookie values are now parsed according
to RFC 6265, section 4.1.1. We also refactor to remove duplicate code
without changing the execution flow.
2019-12-12 14:21:46 +01:00
Máté Kocsis
beee92a887
Remove support for mixing parameter order in implode()
2019-12-12 13:49:05 +01:00
Máté Kocsis
37c1171451
Promote warnings to exceptions in password_*() functions
2019-12-12 12:14:53 +01:00
Nikita Popov
d56768817b
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed bug #78950 : Preloading trait method with static variables
2019-12-12 11:52:51 +01:00
Nikita Popov
be89a5c7f1
Fixed bug #78950 : Preloading trait method with static variables
...
We need to make sure that trait methods with static variables
allocate a separate MAP slot for the static variables pointer,
rather than working in-place.
2019-12-12 11:52:43 +01:00
Nikita Popov
cf9362195b
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix handling of non-final loop var free in sccp
2019-12-12 09:40:54 +01:00
Nikita Popov
2d03b638dc
Fix handling of non-final loop var free in sccp
...
We only need to preserve the FE_FREE that marks the end of the
loop range. Skip FE_FREEs with the FREE_ON_RETURN flag.
2019-12-12 09:39:52 +01:00
Tyson Andre
1695d3ed07
Add funcinfo for spl global functions
...
This assumes that `iterator_*` will now always throw or abort on failure.
Also, move #include _arginfo.h directive to the top of the file - virtually all
other files put it there, and developers may base code on basic_functions.c.
Closes GH-4968
2019-12-11 18:17:04 -05:00
George Peter Banyard
4782e8e28a
Return empty string instead of NULL in serialize().
...
Modifiy its return type accordingly and arginfo.
2019-12-12 00:01:28 +01:00
Christoph M. Becker
15340bea04
Merge branch 'PHP-7.4'
...
* PHP-7.4:
uint/ulong removal may affect other platforms as well
2019-12-11 23:45:03 +01:00
Christoph M. Becker
86aac3eed2
uint/ulong removal may affect other platforms as well
2019-12-11 23:44:46 +01:00
Christoph M. Becker
e161c7bd89
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Typo fix in php.ini-production
2019-12-11 23:16:05 +01:00
Adrian Verde
2bf38aff79
Typo fix in php.ini-production
...
Possibe -> Possible
2019-12-11 23:15:07 +01:00
Máté Kocsis
51eefd8079
Add stubs for standard library
2019-12-11 18:50:36 +01:00
Máté Kocsis
381c9c180b
Promote warnings to exceptions in sapi_windows_* functions
2019-12-11 18:48:14 +01:00
Máté Kocsis
3b0a1905dd
Promote warning to exception in unserialize()
2019-12-11 18:47:59 +01:00
Máté Kocsis
f0b5d55c6f
Promote warning to exception in parse_url()
2019-12-11 18:47:48 +01:00
Máté Kocsis
555eec7d86
Promote warnings to exceptions for some filter functions
2019-12-11 18:47:17 +01:00
Tyson Andre
c31229429b
Merge branch 'array_filter-optimize' into HEAD
2019-12-11 09:40:13 -05:00
Nikita Popov
231bc7c8be
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Revert "Fixed bug #78903 : Conflict in RTD key for closures results in crash"
2019-12-11 14:40:02 +01:00
Nikita Popov
502cd7b1f1
Revert "Fixed bug #78903 : Conflict in RTD key for closures results in crash"
...
This reverts commit b55033fa18 .
This breaks ext/opcache/tests/bug65915.phpt.
2019-12-11 14:38:48 +01:00
George Peter Banyard
a90abe2064
Convert warnings to TypeError in php_spl.c
...
Closes GH-4991
2019-12-11 13:49:16 +01:00
Nikita Popov
33648585d6
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed bug #78903 : Conflict in RTD key for closures results in crash
2019-12-11 13:08:12 +01:00
Nikita Popov
b55033fa18
Fixed bug #78903 : Conflict in RTD key for closures results in crash
...
I wasn't able to create a simple reproducer for this. General approach
is the same as for anonymous classes: If the key is already used, reuse
the old definition.
2019-12-11 13:07:45 +01:00
Nikita Popov
05e6a11b5b
Remove ZEND_PARSE_PARAMS_QUIET from spl_autoload_register()
2019-12-11 11:15:02 +01:00
Nikita Popov
e2a1dbd502
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Free RSA public key in mysqlnd sha256 auth
2019-12-11 10:32:06 +01:00
Nikita Popov
b6a59cee47
Free RSA public key in mysqlnd sha256 auth
...
Not sure why this only started showing up as a leak now.
2019-12-11 10:31:56 +01:00
Dmitry Stogov
ee45dbab37
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Addirional fix for bug #78918
2019-12-11 12:29:10 +03:00
Dmitry Stogov
3280209c03
Addirional fix for bug #78918
2019-12-11 12:21:49 +03:00
Tyson Andre
366713d250
Speed up array_intersect/array_diff/array_filter
...
Use zend_hash_update instead of zend_hash_add.
These are taking a subset of keys from an array with unique keys,
so the result should also have unique keys.
(this is already done for array_map())
Also, speed up array_intersect and array_diff slightly by
using ZEND_HASH_FOREACH macros.
This way, it doesn't need to load the same buckets and array counts
from memory every time (compiler previously couldn't infer they won't change)
```php
<?php
// $n=10000 now takes 0.095 seconds instead of 0.102
function test_bench(int $n) {
$values = range(0,1000);
$other = range(0,1000);
unset($other[500]);
unset($values[400]);
$total = 0;
for ($i = 0; $i < $n; $i++) {
$total += count(array_intersect_key($values, $other));
}
return $total;
}
```
2019-12-10 19:29:49 -05:00
Dmitry Stogov
8fb3ef6e37
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed bug #78937 (Preloading unlinkable anonymous class can segfault)
2019-12-11 00:47:15 +03:00
Dmitry Stogov
20ef51db22
Fixed bug #78937 (Preloading unlinkable anonymous class can segfault)
2019-12-11 00:46:30 +03:00
Dmitry Stogov
764c8159b7
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix error message
2019-12-10 22:17:42 +03:00
Dmitry Stogov
518a8f89c1
Fix error message
2019-12-10 22:17:10 +03:00
Derick Rethans
4f31bcbf2f
Merge branch 'PHP-7.4'
2019-12-10 16:59:09 +00:00
Derick Rethans
2badeb511b
PHP-7.4 is now 7.4.2-dev
2019-12-10 16:56:33 +00:00
Nikita Popov
725c2a999d
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Set zend.exception_ignore_args=0 in run-tests.php
2019-12-10 16:16:03 +01:00
Nikita Popov
e87dc32569
Set zend.exception_ignore_args=0 in run-tests.php
...
Any existing tests are going to be written under this assumption...
2019-12-10 16:15:26 +01:00
Nikita Popov
c2d92ad971
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix incorrect zend_try usage
2019-12-10 15:22:46 +01:00
Nikita Popov
5ddcacac2e
Fix incorrect zend_try usage
2019-12-10 15:22:31 +01:00
Nikita Popov
fa18c115be
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix release build failure
2019-12-10 13:53:19 +01:00