Commit Graph

53351 Commits

Author SHA1 Message Date
Nikita Popov
c858d17f06 Optimize instanceof_function
Split out the simple equality check into an inline function --
this is one of the common cases.

Replace instanceof_function_ex with zend_class_implements_interface.
There are a few more places where it may be used.
2019-10-25 10:51:17 +02:00
Nikita Popov
1f497b3db7 Merge branch 'PHP-7.4'
* PHP-7.4:
  Skip IntlTimeZone::getOffset() error tests on non-x86
2019-10-24 15:26:24 +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
45deb01cc2 Merge branch 'PHP-7.4'
* PHP-7.4:
  Skip large ftruncate test if large files not supported
  Don't test "blocks" in lstat_stat_variation7.phpt
  Increase FD used in php://fd test
  Use posix_getuid() to check for root in pcntl_setpriority() test
2019-10-24 14:47:15 +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
Remi Collet
ff09d39328 Merge branch 'PHP-7.4'
* PHP-7.4:
  Added suppot for glob() wildcard matching in ffi.preload directive
  Reverting push to wrong repo
  Update alloc patch
2019-10-24 07:40:27 +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
aacea14359 Merge branch 'PHP-7.4'
* PHP-7.4:
  Ignore ZEND_FFI_TYPE_OWNED flag
2019-10-23 19:54:52 +03:00
Dmitry Stogov
c744531fff Ignore ZEND_FFI_TYPE_OWNED flag 2019-10-23 19:50:58 +03:00
Nikita Popov
62fcb11cbd Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix aarch64 crc32 implementation
2019-10-23 17:42:16 +02: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
Nikita Popov
ae46df0cb9 JIT: Add option to disable SSA checks 2019-10-23 11:25:13 +02:00
Nikita Popov
fe6c420b02 JIT: Handle typed refs in assign dim 2019-10-23 11:25:10 +02:00
Colin O'Dell
e7335eb420 Allow array_splice() length to be null 2019-10-23 11:22:12 +02:00
Christoph M. Becker
f65d42d56c Merge branch 'PHP-7.4'
* PHP-7.4:
  Added missing call to ZipArchive::close()
2019-10-23 10:47:59 +02:00
Florian Engelhardt
1eae77221e Added missing call to ZipArchive::close() 2019-10-23 10:44:26 +02:00
Nikita Popov
ecc309bfb9 JIT: Fix handling of typed ref in assign dim op 2019-10-23 10:08:25 +02:00
Nikita Popov
2f80fbe3ae JIT: Fix handling of typed ref in assign op 2019-10-23 10:08:09 +02:00
Nikita Popov
8cdbcd7d91 JIT: Check exception after jit_assign_dim_op_helper 2019-10-23 10:07:59 +02:00
Nikita Popov
097184cae7 JIT: UNDEF result on "Illegal offset type" exception 2019-10-23 10:07:48 +02:00
Remi Collet
3d9bbd1b53 Merge branch 'PHP-7.4'
* PHP-7.4:
  add new ffi.preload  option in php.ini and display ini entries in MINFO
2019-10-23 07:49:29 +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
d04297a899 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix typo
2019-10-22 17:54:28 +02:00
Christoph M. Becker
598bf7f5d5 Fix typo 2019-10-22 17:53:34 +02:00
Dmitry Stogov
626a5837c0 Merge branch 'PHP-7.4'
* PHP-7.4:
  Allow loading FFI bindings through ffi.preload directive
2019-10-22 17:53:24 +03:00
Dmitry Stogov
1417352dda Allow loading FFI bindings through ffi.preload directive 2019-10-22 17:52:56 +03:00
Colin O'Dell
e6d3146bdc Accept null lengths for substr functions()
If a null $length is passed to any of these functions, behave as if no
parameter was passed:

 - substr()
 - substr_count()
 - substr_compare()
 - iconv_substr()
2019-10-22 12:09:04 +02:00
Colin O'Dell
8ccd58baca Add Z_PARAM_LONG_OR_NULL macro 2019-10-22 12:09:04 +02:00
Christoph M. Becker
c6cdfa967c Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78716: Function name mangling is wrong for some parameter types
2019-10-22 11:39:40 +02: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
Nikita Popov
530a8a3854 Fix and undeprecate ReflectionType::__toString()
Add deprecated _ZendTestClass::__toString() method to preserve
an existing test.

ReflectionType::__toString() will now return a complete
representation of the type, as it should have originally. Users
that relied on nullability being absent should have been pushed
to ReflectionNamedType::getName() by the deprecation of
ReflectionType::__toString() in PHP 7.1 / PHP 7.4.
2019-10-22 11:26:02 +02:00
Fabien Villepinte
084d401beb Merge branch 'PHP-7.4' 2019-10-21 21:33:30 +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
95390972f1 Merge branch 'PHP-7.4' 2019-10-21 21:17:50 +02:00
Fabien Villepinte
4194e0415b Add tests for ReflectionZendExtension 2019-10-21 21:17:16 +02:00
Dmitry Stogov
42f4bdba2a Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #78512 (Cannot make preload work)
2019-10-21 14:53:03 +03:00
Dmitry Stogov
05c5e5dfde Fixed bug #78512 (Cannot make preload work) 2019-10-21 14:52:26 +03:00
Christoph M. Becker
f7c61c070f Add ext/sodium arginfo stubs 2019-10-21 10:19:57 +02:00
Joe Watkins
174ab25fd4
Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix bug #78697: inaccurate error message
2019-10-21 09:25:24 +02: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
c797ed5cc7 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78633: Heap buffer overflow (read) in mb_eregi
2019-10-20 23:20:26 -07: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
08b7279036 Merge branch 'PHP-7.4' 2019-10-19 22:12:18 +02:00
Fabien Villepinte
4b3e041f5b Fix proto of enchant_broker_list_dicts() 2019-10-19 22:11:34 +02:00