Commit Graph

52990 Commits

Author SHA1 Message Date
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Nikita Popov
fb60ccc666 Merge branch 'PHP-7.4' 2019-09-25 11:03:19 +02:00
Nikita Popov
b8ef7c35ab Increase serialize_lock while decoding session
Avoid leaking state between Serializable::unserialize() and
session_decode().
2019-09-25 11:02:23 +02:00
Nikita Popov
b100d51ba2 Remove xfail on bug70219.phpt
Looks like this is working as it's supposed to, the test expectation
just needs to be adjusted.
2019-09-25 10:57:03 +02:00
Christoph M. Becker
de6b76805d Just return on throwing ZPP 2019-09-25 10:40:45 +02:00
Christoph M. Becker
2540c44dbe Add missing zend_parse_parameters_none() 2019-09-25 10:40:45 +02:00
Nikita Popov
f753975c7a Merge branch 'PHP-7.4' 2019-09-25 10:35:26 +02:00
Nikita Popov
a31256d52c Merge branch 'PHP-7.3' into PHP-7.4 2019-09-25 10:34:33 +02:00
Nikita Popov
915fe2fdc6 Merge branch 'PHP-7.2' into PHP-7.3 2019-09-25 10:34:25 +02:00
Stephen Reay
b0d80e16e3 Add SimpleXML arginfo stubs 2019-09-25 10:34:21 +02:00
Jinesh Patel
d2331cc3f2 Fix hash key length in umsg_parse_format()
Fix array length passed to zend_hash_str_find_ptr() casting from
UChar array to char array requires mul by sizeof(UChar).
2019-09-25 10:30:33 +02:00
Christoph M. Becker
0c7124e6be Add check_only parameter to get_closure handler
`get_closure` handlers are called to check whether an object is
callable, and to actually get the closure, respectively.  The behavior
of the handler might differ for these two cases, particularly the
handler may throw in the latter case, but should not in the former.

Therefore we add a `check_only` parameter, to be able to distinguish
the desired purpose.
2019-09-24 16:08:42 +02:00
Nikita Popov
a369430b00 Avoid signed shift 2019-09-24 11:36:05 +02:00
Stanislav Malyshev
a9dabe0e20 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78559: Heap buffer overflow in mb_eregi
2019-09-23 21:51:26 -07:00
Stanislav Malyshev
e7befd38d4 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78559: Heap buffer overflow in mb_eregi
2019-09-23 21:51:12 -07:00
Christoph M. Becker
8f949eba80 Fix #78559: Heap buffer overflow in mb_eregi
We backport kkos/oniguruma@d3e402928b.
2019-09-23 21:49:55 -07:00
Dmitry Stogov
1030ff5f5f Use cheaper code for scalar type check 2019-09-23 23:04:08 +03:00
Dmitry Stogov
6e226c188c Change ZEND_RECV and ZEND_RECV_VARIADIC to use extended_value for cache slot (instead of op2), to be consistent with ZEND_RECV_INIT. 2019-09-23 22:28:56 +03:00
Benjamin Eberlei
cece939526 Cleanup ext/dom: Additional unimplemented code following 25bfac4 2019-09-23 19:28:55 +02:00
Nikita Popov
131c1a5668 Merge branch 'PHP-7.4' 2019-09-23 17:18:45 +02:00
Nikita Popov
dbeeabed9b Merge branch 'PHP-7.3' into PHP-7.4 2019-09-23 17:18:39 +02:00
Nikita Popov
954d073833 Merge branch 'PHP-7.2' into PHP-7.3 2019-09-23 17:18:33 +02:00
Nikita Popov
3ddb63dce1 Fix skipif condition 2019-09-23 17:17:52 +02:00
Nikita Popov
6276dd826b Use ZEND_TYPE_IS_SET() when checking for property types
Instead of a simple if or 0 comparison. This would no longer work
if zend_type is a struct.
2019-09-23 16:53:54 +02:00
Nikita Popov
3a104c3c37 Merge branch 'PHP-7.4' 2019-09-23 16:43:04 +02:00
Nikita Popov
2bb04106be Merge branch 'PHP-7.3' into PHP-7.4 2019-09-23 16:42:59 +02:00
Nikita Popov
d0f4966b05 Merge branch 'PHP-7.2' into PHP-7.3 2019-09-23 16:42:33 +02:00
Nikita Popov
bc4c4c658c Skip test on 32-bit 2019-09-23 16:42:24 +02:00
Nikita Popov
3012d006ff Don't set nullability flag for parameters without type
Use value 0 instead. To compensate we check in ReflectionParameter
allowsNull() whether the type is set at all: If it isn't, it always
allows null.

This removes a discrepancy between internal&userland functions:
For userland functions allowsNull() on untyped parameters returned
true, but for internal functions it returned false.
2019-09-23 16:39:52 +02:00
Nikita Popov
e441378b54 Update error messages in some more tests 2019-09-23 16:39:52 +02:00
Nikita Popov
8d7911ef56 Standardize type printing in reflection
Use ?T instead of "T or NULL".
2019-09-23 15:40:03 +02:00
Nikita Popov
9e8ba7891e Change representation of zend_type from type code to MAY_BE_* mask
This switches zend_type from storing a single IS_* type code to
storing a MAY_BE_* type mask. Right now most code still assumes
that there is only a single type in the mask (or two together
with MAY_BE_NULL). But this will make it a lot simpler to introduce
union types.

An additional advantage (and why I'm doing this separately), is
that a number of special cases no longer need to be handled
separately: We can do a single mask & (1 << type) check to handle
all simple types, booleans (true|false) and null.
2019-09-23 15:31:35 +02:00
Nikita Popov
9ec2480bd6 Merge branch 'PHP-7.4' 2019-09-23 14:52:45 +02:00
Nikita Popov
41335afed9 Merge branch 'PHP-7.3' into PHP-7.4 2019-09-23 14:52:40 +02:00
Nikita Popov
087051c9a5 Skip test on 32-bit 2019-09-23 14:52:32 +02:00
Nikita Popov
bbc958990c Merge branch 'PHP-7.4' 2019-09-23 13:47:43 +02:00
Nikita Popov
1a184f030a Commit regenerated var_unserializer.c 2019-09-23 13:47:05 +02:00
Nikita Popov
366f97f070 Remove commented code 2019-09-23 13:34:42 +02:00
Nikita Popov
64a5e80bb3 Merge branch 'PHP-7.4' 2019-09-23 13:19:05 +02:00
Nikita Popov
c2add43bbc Merge branch 'PHP-7.3' into PHP-7.4 2019-09-23 13:18:59 +02:00
Nikita Popov
f53af9ac23 Merge branch 'PHP-7.2' into PHP-7.3 2019-09-23 13:18:39 +02:00
Nikita Popov
8509970e6a Fix signed integer overflow in SplObjectStorage unserialization
If count is ZEND_LONG_MIN the count-- loop underflows. This is
ultimately harmless, but results in a ubsan warning.

Fix this by adding a sanity check that the count isn't negative,
because that doesn't make sense...
2019-09-23 13:18:27 +02:00
Nikita Popov
febea5219f Merge branch 'PHP-7.4' 2019-09-23 13:09:12 +02:00
Nikita Popov
3f0cab53b2 Merge branch 'PHP-7.3' into PHP-7.4 2019-09-23 13:09:01 +02:00
Nikita Popov
e65adc9c19 Fix ubsan violation in parse_iv2
This fixes two issues:
 * Negative the value in an unsigned type to avoid signed overflow.
 * Treat -0 as 0 rather than an invalid number that gets converted
   to ZEND_LONG_MIN.
2019-09-23 13:08:44 +02:00
Christoph M. Becker
72f73f95b5 Merge branch 'PHP-7.4'
* PHP-7.4:
  Allow lookup of distro-packaged QDBM headers on Debian
2019-09-23 09:54:59 +02:00
Stephen Reay
7a81505f6f Allow lookup of distro-packaged QDBM headers on Debian 2019-09-23 09:53:31 +02:00
Stephen Reay
01bdc68379 Added arginfo stubs for IMAP extension 2019-09-22 19:25:55 +02:00
Christoph M. Becker
9fa65eed2c Add missing zend_parse_parameters_none() 2019-09-22 19:14:31 +02:00
Christoph M. Becker
ac282a90f1 Add skip reasons 2019-09-22 19:14:30 +02:00