1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 02:33:17 +02:00
Commit Graph

115834 Commits

Author SHA1 Message Date
Tyson Andre dd61edfd7c Update opcache return type info for gd functions
Many of these now have reflection types,
making the old signatures redundant or inaccurate.
(Some methods also throw Errors instead of returning null/false)

Closes GH-4785.
2019-10-07 10:16:50 +02:00
Tyson Andre 02f2056864 Update zend_func_info for pcre/curl/iconv/json
preg_quote and curl_error now have a non-null return type of `string`.

zend_func_info now duplicates many real reflection types
(some of which are now non-null)

Closes GH-4788.
2019-10-07 10:16:31 +02:00
Tyson Andre 52dfe873ab Remove redundant zend_func_info for zlib/hash/session
E.g. hash_equals is outdated - it has a non-null reflection type of bool.

Remove redundant signatures for types that are obviously not reference
counted (`F0`).

Closes GH-4787.
2019-10-07 10:16:08 +02:00
Tyson Andre d0f7a7e7c9 Remove redundant func info for ctype/bc/fileinfo
This is limited to types that aren't reference counted.
I assume the info that there is exactly one reference
should be preserved (e.g. for bcsqrt)

Closes GH-4786.
2019-10-07 10:15:50 +02:00
Tyson Andre 3c2ba240a9 Update zend_func_info for zend, array extensions
Some of these functions now have real reflection types
and will throw instead of return null/false.

Others provide the exact same reflection type information
that zend_func_info does. (or would after updating outdated types)

Closes GH-4790.
2019-10-07 10:15:30 +02:00
Nikita Popov 647b1c7fcf Remove most uses of ZEND_PARSE_PARAMETERS_END_EX()
As ZPP now throws, it makes no sense to specify an explicit return
value.
2019-10-07 10:02:18 +02:00
Nikita Popov 5ff7347a66 Merge branch 'PHP-7.4'
[ci skip]
2019-10-07 09:51:28 +02:00
Nikita Popov 07f4830413 Fix typo in UPGRADING
[ci skip]
2019-10-07 09:51:13 +02:00
Christoph M. Becker 2ff42076ff Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78623: Regression caused by "SP call yields additional empty result set"
2019-10-07 09:19:08 +02:00
Christoph M. Becker b142e8a4b3 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78623: Regression caused by "SP call yields additional empty result set"
2019-10-07 09:18:46 +02:00
Christoph M. Becker 3322c78a88 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78623: Regression caused by "SP call yields additional empty result set"
2019-10-07 09:17:29 +02:00
Christoph M. Becker 114c03b9a6 Fix #78623: Regression caused by "SP call yields additional empty result set"
This reverts commit 41a4379cb4.
2019-10-07 09:15:51 +02:00
Christoph M. Becker 8f7238ed5c Explicitly declare empty parameter list 2019-10-06 19:04:51 +02:00
Christoph M. Becker 058fed6cd9 Just return on failing ZPP 2019-10-06 18:00:17 +02:00
Christoph M. Becker 013506779c Add missing zend_parse_parameters_none() 2019-10-06 17:56:40 +02:00
Christoph M. Becker 0a47096c08 Add MBString arginfo stubs 2019-10-06 17:45:32 +02:00
Thomas Gerbet ff00f49673 Add stubs for ext-xmlrpc 2019-10-06 13:47:21 +02:00
Nikita Popov 21e631e473 Merge branch 'PHP-7.4' 2019-10-06 10:07:57 +02:00
Nikita Popov 6623e7ac51 Add support for mbstring.regex_retry_limit
This is very similar to the existing mbstring.regex_stack_limit,
but for backtracking. The default value matches pcre.backtrack_limit.
Only used on libonig >= 2.8.0.
2019-10-06 10:06:33 +02:00
Benjamin Eberlei e40da2661a Update NEWS 2019-10-05 19:01:50 +02:00
Benjamin Eberlei 6c963694b1 ext/dom: Add global registerNodeNS flag on DOMXPath ctor and property. 2019-10-05 18:56:58 +02:00
Christoph M. Becker 375ceefec0 Add missing zend_parse_parameters_none() 2019-10-05 18:22:01 +02:00
Christoph M. Becker e3abc534eb Add ext/pspell arginfo stubs 2019-10-05 11:11:52 +02:00
Christoph M. Becker 49b98b4d5c Add arginfo stub for JsonSerializable 2019-10-05 11:10:30 +02:00
Nikita Popov 5050507282 Merge branch 'PHP-7.4' 2019-10-04 22:47:10 +02:00
Nikita Popov b078ae6c01 Merge branch 'PHP-7.3' into PHP-7.4 2019-10-04 22:46:53 +02:00
Nikita Popov 239e2dda64 Make sure T_ERROR is returned for all lexer exceptions
This originally manifested as a leak in oss-fuzz #18000. The following
is a reduced test case:

    <?php
    [
        5 => 1,
        "foo" > 1,
        "      " => "" == 0
    ];
    <<<BAR
    $x
     BAR;

Because this particular error condition did not return T_ERROR,
EG(exception) was set while performing binary operation constant
evaluation, which checks exceptions for cast failures.

Instead of adding this indirect test case, I'm adding an assertion
that the lexer has to return T_ERROR if EG(exception) is set.
2019-10-04 22:42:14 +02:00
Nikita Popov 43358cc7b6 Merge branch 'PHP-7.4' 2019-10-04 16:04:42 +02:00
Nikita Popov 01b3cc4dee Merge branch 'PHP-7.3' into PHP-7.4 2019-10-04 16:04:34 +02:00
Nikita Popov 1d6e9da743 Improve diagnostic on PCRE JIT mmap failure
Print a more informative message that indicates that this is
likely a permission issue, and also indicate that pcre.jit=0
can be used to work around it.

Also automatically disable the JIT, so that this message is
only shown once.

See bug #78630.
2019-10-04 16:03:38 +02:00
Christoph M. Becker 487e6e9eca Merge branch 'PHP-7.4'
* PHP-7.4:
  Split intl tests for ICU 65
2019-10-04 13:55:33 +02:00
Christoph M. Becker 884b780667 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Split intl tests for ICU 65
2019-10-04 13:54:49 +02:00
Christoph M. Becker 1ce8c805e2 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Split intl tests for ICU 65
2019-10-04 13:53:58 +02:00
Christoph M. Becker 545412a6cd Split intl tests for ICU 65 2019-10-04 13:53:22 +02:00
Nikita Popov fec0ff8cb0 Merge branch 'PHP-7.4' 2019-10-04 12:42:58 +02:00
Nikita Popov ca652aafa8 Fixed bug #78632
I'm going for a very conservative fix here, where the previous
logic is restored for the case where an object is passed to
method_exists(). We might want to check against EG(scope) instead,
but this seems like a safer choice.

This means that behavior in PHP 7.4 changes only for
method_exists('C', 'privateMethodNotOnC'), which should be sensible.
2019-10-04 12:41:49 +02:00
Dmitry Stogov dc3c8c75da Prefer optimization without JMPZNZ instruction 2019-10-04 12:52:46 +03:00
Nikita Popov d44cf9b539 Replace "unexpected character" warning with ParseError
Closes GH-4767.
2019-10-04 11:28:58 +02:00
Nikita Popov 11d139625f Merge branch 'PHP-7.4' 2019-10-04 10:39:32 +02:00
Nikita Popov 9659562cb5 Fix use-after-free with delayed interned memoized const operand
We should addref CONST operands during memoization, as they might
be destroyed by later compilation, e.g. through interning.
2019-10-04 10:38:11 +02:00
Nikita Popov c10cd739a7 Merge branch 'PHP-7.4' 2019-10-04 10:12:16 +02:00
Nikita Popov f26b60a583 Fix crash when unpacking into array literal with string keys 2019-10-04 10:11:30 +02:00
Christoph M. Becker 0edcd105f3 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78620: Out of memory error
2019-10-04 09:14:36 +02:00
Christoph M. Becker 6627f782d6 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78620: Out of memory error
2019-10-04 09:11:18 +02:00
Dmitry Stogov 3f069b19a0 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #78614 (Does not compile with DTRACE anymore)
2019-10-04 10:10:53 +03:00
Dmitry Stogov 3ded328bea Fixed bug #78614 (Does not compile with DTRACE anymore) 2019-10-04 10:10:22 +03:00
Christoph M. Becker cf183a5e2c Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78620: Out of memory error
2019-10-04 09:09:39 +02:00
Christoph M. Becker abaf9a76dc Fix #78620: Out of memory error
The integer addition in `ZEND_MM_ALIGNED_SIZE_EX` can overflow, what we
have to catch early.
2019-10-04 09:08:01 +02:00
Joe Watkins 26baf5454b Merge branch 'PHP-7.4'
* PHP-7.4:
  fix #78624: session_gc return value for user defined session handlers
2019-10-04 06:16:41 +02:00
Joe Watkins 74ca3a5cad Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  fix #78624: session_gc return value for user defined session handlers
2019-10-04 06:16:18 +02:00