summaryrefslogtreecommitdiff
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix leak in isDefaultValueAvailable()Nikita Popov2020-06-302-2/+25
| | | | | | | | Exposed in Symfony due to exit changes.
* | Merge branch 'PHP-7.4'Christoph M. Becker2020-06-302-1/+16
|\ \ | |/ | | | | | | * PHP-7.4: Fix #70362: Can't copy() large 'data://' with open_basedir
| * Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-06-302-1/+16
| |\ | | | | | | | | | | | | * PHP-7.3: Fix #70362: Can't copy() large 'data://' with open_basedir
| | * Fix #70362: Can't copy() large 'data://' with open_basedirChristoph M. Becker2020-06-302-1/+16
| | | | | | | | | | | | | | | open_basedir is only relevant for plain files, so there is no need to check it for other URL wrappers.
* | | Replace EXPECTF when possibleFabien Villepinte2020-06-2999-108/+103
| | | | | | | | | | | | Closes GH-5779
* | | Tracing JIT support for include() and generatorsDmitry Stogov2020-06-294-11/+26
| | |
* | | Don't record "fake" closuresDmitry Stogov2020-06-291-3/+3
| | |
* | | Fix macro redifinition warnings in debug buildsChristoph M. Becker2020-06-291-1/+0
| | | | | | | | | | | | | | | | | | | | | MSVC considers these warnings[1] to be severe (level 1), so we better fix the respective code. [1] <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4005?view=vs-2019>
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-06-294-14/+77
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #63208: BSTR to PHP string conversion not binary safe
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-06-294-14/+77
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #63208: BSTR to PHP string conversion not binary safe
| | * Fix #63208: BSTR to PHP string conversion not binary safeChristoph M. Becker2020-06-294-14/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A `BSTR` is similar to a `zend_string`; it stores the length of the string just before the actual string, and thus the string may contain NUL bytes. However, `php_com_olestring_to_string()` is supposed to deal with arbitrary `OLECHAR*`s which may not be `BSTR`s, so we introduce `php_com_bstr_to_string()` and use it for the only case where we actually have to deal with `BSTR`s which may contain NUL bytes. Contrary to `php_com_olestring_to_string()` we return a `zend_string`, so we can save the re-allocation when converting to a `zval`. We also cater to `php_com_string_to_olestring()` not being binary safe, with basically the same fix we did for `php_com_olestring_to_string()`.
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-06-292-0/+16
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #79756: finfo_file crash (FILEINFO_MIME)
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-06-292-0/+16
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #79756: finfo_file crash (FILEINFO_MIME)
| | * Fix #79756: finfo_file crash (FILEINFO_MIME)Christoph M. Becker2020-06-292-0/+16
| | | | | | | | | | | | | | | If `ctime` or `asctime` return `NULL`, we must not attempt to copy the buffer, but rather return `NULL` as well.
* | | Fix #79749: Converting FFI instances to bool failsChristoph M. Becker2020-06-292-1/+27
| | | | | | | | | | | | | | | | | | Casting objects to bool is supposed to yield `true`. Since the `cast_object` handler is required now, we have to implement the `_IS_BOOL` conversion there.
* | | Don't accept objects instead of arrays in curlNikita Popov2020-06-293-16/+14
| | | | | | | | | | | | | | | | | | | | | | | | This properly addresses the issue from bug #79741. Silently interpreting objects as mangled property tables is almost always a bad idea. Closes GH-5773.
* | | Make exit() unwind properlyNikita Popov2020-06-296-28/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | exit() is now internally implemented by throwing an exception, performing a normal stack unwind and a clean shutdown. This ensures that no persistent resource leaks occur. The exception is internal, cannot be caught and does not result in the execution of finally blocks. This may be relaxed in the future. Closes GH-5768.
* | | Fixed bug #79743 (Fatal error when assigning to array property with JIT enabled)Xinchen Hui2020-06-291-4/+4
| | | | | | | | | | | | simple typo
* | | Implement Attribute Amendments.Martin Schröder2020-06-294-26/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | RFC: https://wiki.php.net/rfc/attribute_amendments Support for attribute grouping is left out, because the short attribute syntax RFC will likely make it obsolete. Closes GH-5751.
* | | Remove restriction on method call inliningNikita Popov2020-06-291-7/+0
| | | | | | | | | | | | | | | In PHP 8, we are guaranteed that $this exists, so we no longer have to forbid this case.
* | | Merge branch 'PHP-7.4'Nikita Popov2020-06-291-0/+6
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Don't inline static call to instance method
| * | Don't inline static call to instance methodNikita Popov2020-06-291-0/+6
| | | | | | | | | | | | Fixes the failure in bug79740.phpt with opcache.
* | | Drop non-well formed numeric strings from math function testsGeorge Peter Banyard2020-06-2817-180/+12
| | |
* | | Drop non-well numeric string in Intl testGeorge Peter Banyard2020-06-281-4/+0
| | |
* | | Drop non-well formed numeric strings in array function testsGeorge Peter Banyard2020-06-282-14/+3
| | |
* | | Drop non-well formed numeric strings in strings function testsGeorge Peter Banyard2020-06-282-11/+1
| | |
* | | Merge branch 'PHP-7.4'Nikita Popov2020-06-262-2/+18
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fixed bug #79741
| * | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-06-262-2/+18
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fixed bug #79741
| | * Fixed bug #79741Nikita Popov2020-06-262-2/+18
| | |
* | | Cache __unserialize() instead of unserialize()Nikita Popov2020-06-265-37/+22
| | | | | | | | | | | | | | | We should use these cache slots for the new object serialization mechanism rather than the old one.
* | | Use cheaper zend_hash_find_ex() to handle IS_CONST indexDmitry Stogov2020-06-261-8/+32
| | |
* | | Fix uninitialized reads in min/maxNikita Popov2020-06-261-6/+4
| | | | | | | | | | | | | | | We need to use the unstable comparison function here, the fallback order is not initialized in this context.
* | | [ci skip] Various typo fixes in stub comments and CHANGES fileAyesh Karunaratne2020-06-254-4/+4
| | |
* | | Fixed incorrect type guardDmitry Stogov2020-06-251-1/+1
| | |
* | | Move exception check to cold path.Dmitry Stogov2020-06-251-6/+18
| | |
* | | Optimization for +/- int(0)Dmitry Stogov2020-06-251-5/+22
| | |
* | | Improve tracing JIT for FETCH_THIS + FETCH_OBJ_*Dmitry Stogov2020-06-255-28/+128
| | |
* | | Fix leaks in Phar::webPhar()Nikita Popov2020-06-251-20/+6
| | |
* | | Don't throw warning if exception thrown during dom validationNikita Popov2020-06-253-6/+6
| | |
* | | Avoid warning on exception in xsl extNikita Popov2020-06-253-3/+46
| | |
* | | Avoid $this checkDmitry Stogov2020-06-251-18/+20
| | |
* | | Cheaper exception checksDmitry Stogov2020-06-254-32/+34
| | |
* | | Don't include trailing newline in comment tokenNikita Popov2020-06-252-89/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't include a trailing newline in T_COMMENT tokens, instead leave it for a following T_WHITESPACE token. The newline does not belong to the comment logically, and this makes for an ugly special case, as other tokens do not include trailing newlines. Whitespace-sensitive tooling will want to either forward or backward emulate this change. Closes GH-5182.
* | | Make sorting stableNikita Popov2020-06-2511-191/+359
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make user-exposed sorts stable, by storing the position of elements in the original array, and using those positions as a fallback comparison criterion. The base sort is still hybrid q/insert. The use of true/false comparison functions is deprecated (but still supported) and should be replaced by -1/0/1 comparison functions, driven by the <=> operator. RFC: https://wiki.php.net/rfc/stable_sorting Closes GH-5236.
* | | Don't use iterator_funcs_ptr if it is nullNikita Popov2020-06-251-3/+9
| | | | | | | | | | | | | | | | | | This avoids ubsan warnings. Alternatively we could always initialize iterator_funcs_ptr for aggregates, instead of doing so only for non-internal ones.
* | | Remove useless prototype for spl_heap_get_iteratorAlex Dowad2020-06-241-2/+0
| | |
* | | Fix {{{ comment to match function name for php_replace_controlchars_exAlex Dowad2020-06-241-1/+1
| | |
* | | Introduce InternalIteratorNikita Popov2020-06-2424-17/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Userland classes that implement Traversable must do so either through Iterator or IteratorAggregate. The same requirement does not exist for internal classes: They can implement the internal get_iterator mechanism, without exposing either the Iterator or IteratorAggregate APIs. This makes them usable in get_iterator(), but incompatible with any Iterator based APIs. A lot of internal classes do this, because exposing the userland APIs is simply a lot of work. This patch alleviates this issue by providing a generic InternalIterator class, which acts as an adapater between get_iterator and Iterator, and can be easily used by many internal classes. At the same time, we extend the requirement that Traversable implies Iterator or IteratorAggregate to internal classes as well. Closes GH-5216.
* | | Make SimpleXMLElement a RecursiveIteratorNikita Popov2020-06-2411-295/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Context: https://externals.io/message/108789 This essentially moves the functionality of SimpleXMLIterator into SimpleXMLElement, and makes SimpleXMLIterator a no-op extension. Ideally SimpleXMLElement would be an IteratorAggregate, whose getIterator() method returns SimpleXMLIterator. However, because SimpleXMLIterator extends SimpleXMLElement (and code depends on this in non-trivial ways), this is not possible. The only way to not keep SimpleXMLElement as a magic Traversable (that implements neither Iterator nor IteratorAggregate) is to move the SimpleXMLIterator functionality into it. Closes GH-5234.
* | | Add the ZEND_ACC_NO_DYNAMIC_PROPERTIES flag to ShmopMáté Kocsis2020-06-241-1/+1
| | |