summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update NEWSPHP-7.4.3Derick Rethans2020-02-181-7/+12
|
* Fix # 79171: heap-buffer-overflow in phar_extract_fileChristoph M. Becker2020-02-181-1/+1
| | | | We must not access memory outside of the allocated buffer.
* Fix bug #79221 - Null Pointer Dereference in PHP Session Upload ProgressStanislav Malyshev2020-02-182-4/+51
|
* Fix bug #79082 - Files added to tar with Phar::buildFromIterator have ↵Stanislav Malyshev2020-02-184-0/+65
| | | | all-access permissions
* Fix #79247: Garbage collecting variant objects segfaultsChristoph M. Becker2020-02-133-1/+27
| | | | | | | | variant objects have no (declared) properties, so the `get_properties` handlers returns a pointer to constant storage for efficiency reasons. This pointer must not be returned from the `get_gc` handler, though; instead we set up an own `get_gc` handler and return NULL from it, to signal that there are no properties to collect.
* Update NEWS for PHP 7.4.3RC1Derick Rethans2020-02-041-1/+1
|
* Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-02-043-12/+13
|\ | | | | | | | | * PHP-7.3: Fix #78090: bug45161.phpt takes forever to finish
| * Fix #78090: bug45161.phpt takes forever to finishChristoph M. Becker2020-02-043-12/+13
| | | | | | | | | | | | Not all systems support the discard protocol (TCP port 9), and since there is no particular reason to use it, we switch to using actual server testing.
* | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-02-036-21/+77
|\ \ | |/ | | | | | | * PHP-7.3: Fix #79191: Error in SoapClient ctor disables DOMDocument::save()
| * Fix #79191: Error in SoapClient ctor disables DOMDocument::save()Christoph M. Becker2020-02-036-21/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The culprit is the too restrictive fix for bug #71536, which prevents `php_libxml_streams_IO_write()` from properly executing when unclean shutdown is flagged. A *more* suitable solution is to move the `xmlwriter_free_resource_ptr()` call from the `free_obj` handler to an added `dtor_obj` handler, to avoid to write to a closed stream in case of late object freeing. This makes the `EG(active)` guard superfluous. We also fix bug79029.phpt which has to use different variables for the three parts to actually check the original shutdown issue. Thanks to bwoebi and daverandom for helping to investigate this issue.
* | Apply tidy formattingNikita Popov2020-02-0347-7449/+7449
| | | | | | | | Mostly reindent PHP scripts to spaces.
* | Add tidy.php to enforce formattingNikita Popov2020-02-031-0/+145
| | | | | | | | | | Many parts are disabled for the PHP-7.4 branch. We only strip trailing whitespace in C files and reindent .php files to spaces.
* | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-02-031-2/+2
|\ \ | |/ | | | | | | * PHP-7.3: Relax test expectation
| * Relax test expectationChristoph M. Becker2020-02-031-2/+2
| | | | | | | | | | | | | | Since we're dealing with floating point numbers, precision issues may hit us, and actually it's not necessary to check for the exact number anyway, because it is not exact in the first place. Therefore, we relax the test expectations.
* | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-02-033-15/+36
|\ \ | |/ | | | | | | * PHP-7.3: Fix #79212: NumberFormatter::format() may detect wrong type
| * Fix #79212: NumberFormatter::format() may detect wrong typeChristoph M. Becker2020-02-033-15/+36
| | | | | | | | | | | | | | | | | | | | | | We have to convert to number *before* detecting the type, to cater to internal objects implementing `cast_object`. We also get rid of the fallback behavior of using `FORMAT_TYPE_INT32`, because that can no longer happen; after `convert_scalar_to_number_ex` the type is either `IS_LONG` or `IS_DOUBLE`. We cater explicitly to the `IS_ARRAY` case what also avoids triggering a type confusion when `::TYPE_INT64` is passed as `$type`.
* | add testRemi Collet2020-02-032-0/+30
| |
* | NEWSRemi Collet2020-02-031-3/+5
| |
* | Fixed bug #73119 Wrong return for ZipArchive::addEmptyDir MethodRemi Collet2020-02-032-3/+7
| |
* | Add WHITESPACE_SENSITIVE run-tests sectionNikita Popov2020-02-033-1/+3
| | | | | | | | | | This is used to indicate that the test should not be changed by automated formatting changes.
* | Disable parallelism for FPM testsNikita Popov2020-02-031-1/+3
| | | | | | | | Let's see if this helps with spurious failures on Azure.
* | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-01-316-13/+81
|\ \ | |/ | | | | | | * PHP-7.3: Fix bug #76047
| * Fix bug #76047Nikita Popov2020-01-315-12/+81
| | | | | | | | | | | | | | | | | | Unlink the current stack frame before freeing CVs or extra args. This means it will no longer show up in back traces that are generated during CV destruction. We already did this prior to destructing the object/closure, presumably for the same reason.
* | Fixed bug #79094 (Crashing when running recursion function)Dmitry Stogov2020-01-313-6/+39
| |
* | fix cross compilation failure due to size_t typecast in definePascal de Bruijn2020-01-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following commit introduces a cross-compilation failure: 93c728b77cfb47f5cfdd1863f8982ea59d344205 "Try to control ZEND_MM_ALIGNED_SIZE type" br-arm-full/build/php-7.4.2/Zend/zend_alloc.h:30:38: error: missing binary operator before token "8" ^ br-arm-full/build/php-7.4.2/ext/opcache/ZendAccelerator.c:1380:7: note: in expansion of macro ‘ZEND_MM_ALIGNMENT’ Closes GH-5128.
* | Fixed bug #79193Nikita Popov2020-01-303-0/+27
| |
* | Fix live range calculation for FE_FETCHNikita Popov2020-01-302-1/+23
| | | | | | | | Op2 is def here, not a use, so treat it accordingly.
* | Fix DatePeriod property handling with indirect modificationNikita Popov2020-01-302-4/+17
| | | | | | | | | | We do need to implement get_property_ptr_ptr to make arrays work correctly.
* | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-01-303-1/+55
|\ \ | |/ | | | | | | * PHP-7.3: Fix #70078: XSL callbacks with nodes as parameter leak memory
| * Fix #70078: XSL callbacks with nodes as parameter leak memoryChristoph M. Becker2020-01-303-1/+55
| | | | | | | | | | | | | | | | | | The fix for bug #49634 solved a double-free by copying the node with `xmlDocCopyNodeList()`, but the copied node is later freed by calling `xmlFreeNode()` instead of `xmlFreeNodeList()`, thus leaking memory. However, there is no need to treat the node as node list, i.e. to copy also the node's siblings; just creating a recursive copy of the node with `xmlDocCopyNode()` is sufficient, while that also avoids the leak.
* | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-01-302-0/+13
|\ \ | |/ | | | | | | * PHP-7.3: Fix leak in DateTimeImmutable::modify()
| * Fix leak in DateTimeImmutable::modify()Nikita Popov2020-01-302-0/+13
| |
* | Fix copying of functions in variance obligationsNikita Popov2020-01-302-2/+23
| | | | | | | | Only copy sizeof(zend_internal_function) for internal functions.
* | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-01-301-0/+2
|\ \ | |/ | | | | | | * PHP-7.3: Add SKIPIF to test requiring mbregex
| * Add SKIPIF to test requiring mbregexNikita Popov2020-01-301-0/+2
| |
* | Reset trampoline on executor startupNikita Popov2020-01-301-0/+1
| | | | | | | | | | Make sure the trampoline is usable, even if we had an unclean shutdown on the last request.
* | Fix UAF in is_callable() and allocated trampolineNikita Popov2020-01-302-7/+28
| | | | | | | | | | By nulling out the function_handler, so it will not get used below. Reuse the existing helper for this purpose.
* | Fix shift ub in mbstringNikita Popov2020-01-302-8/+8
| | | | | | | | Ideally "c" would be an unsigned integer...
* | Restore digit check in mb_decode_numericentity()Nikita Popov2020-01-302-1/+3
| | | | | | | | | | | | | | I replaced it with a multiplication overflow check in 18599f9c52959b2e8cbfac57e278644499a3547d. However, we need both, because the code for restoring the number can't handle numbers with many leading zeros right now and I don't feel like teaching it.
* | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-01-292-4/+9
|\ \ | |/ | | | | | | * PHP-7.3: Fix mb_ord() crash if internal encoding not supported
| * Fix mb_ord() crash if internal encoding not supportedNikita Popov2020-01-292-4/+9
| | | | | | | | | | enc_name can be NULL here. Take the name from the mbfl_encoding instead.
* | Better overflow check for entity decodingNikita Popov2020-01-292-3/+6
| | | | | | | | Check for multiplication overflow rather than number of digits.
* | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-01-291-0/+1
|\ \ | |/ | | | | | | * PHP-7.3: Reset MBREX(search_re) in RSHUTDOWN
| * Reset MBREX(search_re) in RSHUTDOWNNikita Popov2020-01-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is going to cause a segfault if reused in the next request. To illustrate the issue, run these two scripts in sequence with the built-in server: // script1.php mb_ereg_search_init('foobar'); mb_ereg_search('foo'); // script2.php var_dump(mb_ereg_search_init("foobar")); var_dump(mb_ereg_search_pos());
* | zip: more constantsRemi Collet2020-01-292-1/+26
| |
* | Backport 7d2ef3d2e540885dec26d91dad061bff1621ad07 into 7.4Anatol Belski2020-01-291-1/+2
| | | | | | | | | | As the data structures are public, the fix for 64-bit consists on replacing the blanket memcpy with individual assignments.
* | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-01-292-3/+22
|\ \ | |/ | | | | | | * PHP-7.3: Fix use of mb_ereg_search_getregs() after invalid pattern
| * Fix use of mb_ereg_search_getregs() after invalid patternNikita Popov2020-01-292-3/+22
| | | | | | | | | | This segfaulted because we assumed that if there are matches, there must be a regular expression as well.
* | Fix length inconsistency in mb_convert_encodingNikita Popov2020-01-292-1/+5
| | | | | | | | | | | | | | | | Don't mix strlen() and ZSTR_LEN(). If the encoding contains a NULL byte, this will overflow the buffer. NULL bytes will still make this behave oddly because the consuming code will cut off the string there, but let's address that in master...
* | Fix recovery of large entities in mb_decode_numericentity()Nikita Popov2020-01-292-6/+10
| | | | | | | | Make sure we don't overflow the integer.