Derick Rethans
36b2b3e80e
Merge branch 'PHP-8.1'
2021-11-30 18:41:35 +00:00
Derick Rethans
2fb7b6e3e9
Merge branch 'PHP-8.0' into PHP-8.1
2021-11-30 18:41:29 +00:00
Derick Rethans
977e132842
Merge branch 'PHP-7.4' into PHP-8.0
2021-11-30 18:41:16 +00:00
Derick Rethans
f533744c92
Prepare for 7.4.28
2021-11-30 18:40:42 +00:00
Dmitry Stogov
26449de4d8
Merge branch 'PHP-8.1'
...
* PHP-8.1:
JIT: Fix incorrect code produced for BOOL_NOT and [double, undef] operand
2021-11-30 20:45:57 +03:00
Dmitry Stogov
07389566ac
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
JIT: Fix incorrect code produced for BOOL_NOT and [double, undef] operand
2021-11-30 20:44:46 +03:00
Dmitry Stogov
e7b31f57ec
JIT: Fix incorrect code produced for BOOL_NOT and [double, undef] operand
...
Fixes oss-fuzz #41531
2021-11-30 20:36:52 +03:00
David CARLIER
283669f1ae
pcntl add forkx for solaris based systems. ( #7654 )
2021-11-30 15:47:14 +01:00
Tyson Andre
032de9e001
Optimize SplObjectStorage native read/write/has/unset dimension handlers
...
This makes reading/writing with `$splObjectStorage[$offset]` shorthand twice as
fast as it was previously, and a bit faster than offsetGet/offsetSet instead of
(previously) much slower.
Call destructor after overriding old SplObjectStorage entry.
Previously, it was called before, which was possibly unsafe
if the destructor had side effects.
Add tests.
Closes GH-7695
Related to GH-7690
Check for ref in SplObjectStorage->__unserialize, check for ref.
SplObjectStorage->unserialize may be a different cause of references
for malformed inputs, so continue checking
In internally used methods, convert references to non-references if they're
found.
2021-11-30 09:09:12 -05:00
Dmitry Stogov
532f2ca7ff
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix crash after indirect modification of string by user error handler
2021-11-30 16:10:11 +03:00
Dmitry Stogov
afd881718e
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix crash after indirect modification of string by user error handler
2021-11-30 16:09:58 +03:00
Dmitry Stogov
df434f056f
Fix crash after indirect modification of string by user error handler
...
Fixes oss-fuzz #39346
2021-11-30 16:07:38 +03:00
Dmitry Stogov
c2aea6e805
Merge branch 'PHP-8.1'
...
* PHP-8.1:
JIT: Fix incorrect reference counting inference
2021-11-30 13:00:13 +03:00
Dmitry Stogov
3564001502
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
JIT: Fix incorrect reference counting inference
2021-11-30 13:00:04 +03:00
Dmitry Stogov
c1036194d6
JIT: Fix incorrect reference counting inference
...
Fixes oss-fuzz #40747
2021-11-30 12:58:54 +03:00
Dmitry Stogov
517738b19b
Merge branch 'PHP-8.1'
...
* PHP-8.1:
JIT: Fix uninitialized result of ASSIGN_DIM[_OP] after clobbering array by user error handler
2021-11-30 11:42:58 +03:00
Dmitry Stogov
005d5f4df8
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
JIT: Fix uninitialized result of ASSIGN_DIM[_OP] after clobbering array by user error handler
2021-11-30 11:41:55 +03:00
Dmitry Stogov
6e1fe96962
JIT: Fix uninitialized result of ASSIGN_DIM[_OP] after clobbering array by user error handler
...
Fixes oss-fuzz #41208
2021-11-30 11:40:18 +03:00
Dmitry Stogov
0d6232dc72
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Restore line, removed by mistake in b914122389
2021-11-30 09:45:15 +03:00
Dmitry Stogov
3c3626a903
Restore line, removed by mistake in b914122389
2021-11-30 09:44:36 +03:00
Dmitry Stogov
e1baef1835
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fixed type inference (it's safe to ignore reference counting narrowing)
2021-11-29 23:40:49 +03:00
Dmitry Stogov
2d3ea98624
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fixed type inference (it's safe to ignore reference counting narrowing)
2021-11-29 23:39:37 +03:00
Dmitry Stogov
86430e8e01
Fixed type inference (it's safe to ignore reference counting narrowing)
2021-11-29 23:32:52 +03:00
Dmitry Stogov
8cdead1568
Merge branch 'PHP-8.1'
...
* PHP-8.1:
JIT: Fix exception handling when next array element is already occupied
2021-11-29 21:57:38 +03:00
Dmitry Stogov
23c5a6fd16
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
JIT: Fix exception handling when next array element is already occupied
2021-11-29 21:57:29 +03:00
Dmitry Stogov
aff115547f
JIT: Fix exception handling when next array element is already occupied
...
Fixes oss-fuzz #41408
2021-11-29 21:44:00 +03:00
Christoph M. Becker
c0d890e918
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix #74604 : Out of bounds in php_pcre_replace_impl
2021-11-29 19:17:49 +01:00
Christoph M. Becker
60717fcd34
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix #74604 : Out of bounds in php_pcre_replace_impl
2021-11-29 19:17:16 +01:00
Christoph M. Becker
816aa20391
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #74604 : Out of bounds in php_pcre_replace_impl
2021-11-29 19:15:20 +01:00
Christoph M. Becker
712fc54e85
Fix #74604 : Out of bounds in php_pcre_replace_impl
...
Trying to allocate a `zend_string` with a length only slighty smaller
than `SIZE_MAX` causes an integer overflow; we make sure that this
doesn't happen by catering to the maximal overhead of a `zend_string`.
Closes GH-7597.
2021-11-29 19:12:55 +01:00
Dmitry Stogov
1b36555148
Merge branch 'PHP-8.1'
...
* PHP-8.1:
JIT: Fix named arguments handling
JIT: Fix named arguments handling
2021-11-29 18:43:34 +03:00
Dmitry Stogov
b914122389
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
JIT: Fix named arguments handling
JIT: Fix named arguments handling
2021-11-29 18:43:24 +03:00
Dmitry Stogov
d955415114
JIT: Fix named arguments handling
...
Fixes oss-fuzz #41486
2021-11-29 18:39:50 +03:00
Dmitry Stogov
8f4cfe04eb
JIT: Fix named arguments handling
...
Fixes oss-fuzz #41486
2021-11-29 18:37:49 +03:00
Christoph M. Becker
e73cccd9f2
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix #81659 : stream_get_contents() may unnecessarily overallocate
2021-11-29 14:50:54 +01:00
Christoph M. Becker
b0823438a9
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix #81659 : stream_get_contents() may unnecessarily overallocate
2021-11-29 14:50:19 +01:00
Christoph M. Becker
f3bd24a200
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #81659 : stream_get_contents() may unnecessarily overallocate
2021-11-29 14:48:11 +01:00
Christoph M. Becker
31749aac62
Fix #81659 : stream_get_contents() may unnecessarily overallocate
...
Since we're going to read from the current stream position anyway, the
`max_len` should be the size of the file minus the current position
(still catering to potentially filtered streams). We must, however,
make sure to cater to the file position being beyond the actual file
size.
While we're at, we also fix the step size in the comment, which is 8K.
A further optimization could be done for unfiltered streams, thus
saving that step size, but 8K might not be worth it.
Closes GH-7693.
2021-11-29 14:46:09 +01:00
Dmitry Stogov
ee38e3ac37
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Disable type narrowing optimization when we contruct SSA for JIT
2021-11-29 15:54:53 +03:00
Dmitry Stogov
c6e895aec2
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Disable type narrowing optimization when we contruct SSA for JIT
2021-11-29 15:53:16 +03:00
Dmitry Stogov
297117bbc5
Disable type narrowing optimization when we contruct SSA for JIT
...
This also revets incorrect fix introduced in f9518c3850
2021-11-29 15:51:54 +03:00
Tyson Andre
fbdded1ff1
Use interned string for calling count() in Zend VM
...
Similar to f0dd79a7e4
Copied from GH-7695
2021-11-28 14:09:54 -05:00
Nikita Popov
c5d6f59e96
Use custom object instead of resource for soap server service
...
The "service" resource is a purely internal structure used by
SoapServer, which userland code cannot interact with. Instead of
storing it as a resource in an object propperty, use a custom
object structure instead.
2021-11-28 18:37:29 +01:00
Nikita Popov
f0dd79a7e4
Optimize ArrayAccess method lookup
...
While these currently aren't cached in the class entry, we can
at least save us a lowercasing and hash calculation of the method
name.
2021-11-28 13:06:17 +01:00
Tyson Andre
7504cf189b
Improve performance of WeakReference/WeakMap. Avoid hash collisions on pointers. ( #7690 )
...
Shift pointers by ZEND_MM_ALIGNMENT_LOG2
to avoid the noticeable performance degradation caused by hash table collisions.
in `EG(weakrefs)` and zend_weakmap->ht
On 64-bit platforms, pointers are usually aligned to at least 8 bytes,
so only one in 8 hash buckets were actually getting used.
(With the metadata needed to track allocations,
alignment might be at least 16 bytes in practice)
Address review comments, add optimization
Make it public for any extensions that need to work with EG(weakrefs)
for instrumentation, debugging, etc. (e.g. zend_test)
PHP 8.1 and previous releases would use the raw pointer value as a hash key instead.
2021-11-27 19:52:30 -05:00
Jakub Zelenka
c4a1c0c18c
Merge branch 'PHP-8.1'
2021-11-27 22:43:37 +00:00
Jakub Zelenka
a529d0dd15
Merge branch 'PHP-8.0' into PHP-8.1
2021-11-27 22:39:51 +00:00
Jakub Zelenka
81513e6285
Add skip for FPM process idle flaky test
2021-11-27 22:37:43 +00:00
Patrick Allaert
99d130acbc
Reordering non bug entries
2021-11-27 13:18:59 +01:00
Patrick Allaert
75546bdef2
Standardize: Fixed Bug -> Fixed bug
2021-11-27 13:13:26 +01:00