summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| | * Always remove HT iterators, even for uninit HTNikita Popov2021-03-012-1/+16
| | | | | | | | | | | | Fixes oss-fuzz #31423.
* | | Optimize serializing class namesTyson Andre2021-03-011-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Because of the memcpy, compilers can't infer that ZSTR_LEN (i.e. class_name->len) did not change, so they copy it out of memory into a register for the last two accesses. php_var_serialize_string already does something similar. Closes GH-6734
* | | Merge branch 'PHP-8.0'Nikita Popov2021-03-010-0/+0
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Fixed bug #80805
| * | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-03-010-0/+0
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: Fixed bug #80805
| | * Fixed bug #80805Nikita Popov2021-03-013-4/+36
| | | | | | | | | | | | | | | | | | Handle missing result_var in binary_op_result_type. (cherry picked from commit 8446e2827585c37d0739f8d44fa8d359cbbb6551)
* | | Optimized object serialization without rebulding properties HashTableDmitry Stogov2021-03-011-0/+51
| | |
* | | Incomplete class may have only single "MAGIC_MEMBER"Dmitry Stogov2021-03-011-0/+1
| | |
* | | Change the order of properties used in foreach(), var_dump(), serialize(), ↵Dmitry Stogov2021-03-0136-286/+283
|\ \ \ | | | | | | | | | | | | comparison, etc. Now properties are ordered according to their layout in zend_object structure.
| * | | Added UPGRADING note.Dmitry Stogov2021-03-011-0/+9
| | | |
| * | | Change the order of properties used for var_dump(), serialize(), comparison, ↵Dmitry Stogov2021-03-0135-286/+274
| | | | | | | | | | | | | | | | | | | | | | | | etc. Now properties are ordered according to their layout in zend_object structure.
* | | | Reference dynamic functions through dynamic_defsNikita Popov2021-03-0119-131/+245
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, dynamically declared functions and closures are inserted into the function table under a runtime definition key, and then later possibly renamed. When opcache is not used and a file containing a closure is repeatedly included, this leads to a very large memory leak, as the no longer needed closure declarations will never be freed (https://bugs.php.net/bug.php?id=76982). With this patch, dynamic functions are instead stored in a dynamic_func_defs member on the op_array, which opcodes reference by index. When the parent op_array is destroyed, the dynamic_func_defs it contains are also destroyed (unless they are stilled used elsewhere, e.g. because they have been bound, or are used by a live closure). This resolves the fundamental part of the leak, though doesn't completely fix it yet due to some arena allocations. The main non-obvious change here is to static variable handling: We can't destroy static_variables_ptr in destroy_op_array, as e.g. that would clear the static variables in a dynamic function when the op_array containing it is destroyed. Static variable destruction is separated out for this reason (we already do static variable destruction separately for normal functions, so we only need to handle main scripts). Closes GH-5595.
* | | Fix E_DEPRECATED in zend_vm_gen.phpMax Semenik2021-03-011-3/+4
| | | | | | | | | | | | | | | | | | | | | explode(): Passing null to parameter #2 ($string) of type string is deprecated Closes GH-6698.
* | | run-tests: drop support for ancient Valgrind versionsMax Semenik2021-03-011-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | Valgrind 3.3.0 was released in 2007, not even RHEL has crap older than this. It could be argued that 3.8.0, released in 2012, could be a safe cutoff too. Closes GH-6728.
* | | Clarify types in XmlReader property handlingNikita Popov2021-03-011-9/+7
| | | | | | | | | | | | | | | Make it clearer that the specified type is really the only type that can be returned.
* | | Remove useless conditional #ifdefPatrick Allaert2021-02-271-4/+1
| | | | | | | | | | | | | | | | | | Closes GH-6737 Signed-off-by: George Peter Banyard <girgias@php.net>
* | | Merge branch 'PHP-8.0'George Peter Banyard2021-02-275-4/+131
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Fix Bug #80800 imap_open() fails when the flags parameter includes CL_EXPUNGE
| * | Fix Bug #80800 imap_open() fails when the flags parameter includes CL_EXPUNGEGeorge Peter Banyard2021-02-276-4/+135
| | | | | | | | | | | | | | | | | | | | | | | | This also affected imap_reopen(). Add a supplementary test that the CL_EXPUNGE flag does have the intended effect. Closes GH-6732
* | | serialize() optimizationDmitry Stogov2021-02-261-31/+88
| | |
* | | Optimize out zend_strpprintf() usage for simple concationatonDmitry Stogov2021-02-261-6/+18
| | |
* | | Improve SPL directory and stat() cache using zend_srting* instead of char*Dmitry Stogov2021-02-2613-286/+274
| | |
* | | Merge branch 'PHP-8.0'Felipe Pena2021-02-251-0/+9
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.4' into PHP-8.0Felipe Pena2021-02-251-0/+9
| |\ \ | | |/
| | * Fix memleak on ReflectionFunction and ReflectionGenerator classes when ↵Felipe Pena2021-02-251-0/+9
| | | | | | | | | | | | calling __construct after instantiation
* | | Remove quicktesterGeorge Peter Banyard2021-02-259-319/+408
| | | | | | | | | | | | | | | | | | This is barely used and more of a hinderence than anything else Closes GH-6712
* | | Merge branch 'PHP-8.0'Remi Collet2021-02-251-1/+2
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: skip test with openssl < 1.1.0
| * | Merge branch 'PHP-7.4' into PHP-8.0Remi Collet2021-02-251-1/+2
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: skip test with openssl < 1.1.0
| | * skip test with openssl < 1.1.0Remi Collet2021-02-251-1/+2
| | | | | | | | | | | | | | | The test fails, but without any crash (this test is designed to catch a crash)
* | | Merge branch 'PHP-8.0'Christoph M. Becker2021-02-251-0/+3
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Capture Microsoft-defined HRESULT exit codes exit codes
| * | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-02-251-0/+3
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: Capture Microsoft-defined HRESULT exit codes exit codes
| | * Capture Microsoft-defined HRESULT exit codes exit codesDylan K. Taylor2021-02-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | The lack of such a check leads to false-passes of tests on Windows which expect no output, but produce a segfault or similar issue. I discovered this a while ago due to bad tests in an extension I maintain. Closes GH-6722.
* | | Merge branch 'PHP-8.0'Nikita Popov2021-02-251-3/+7
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: crc32 module, clang spurious warning removal.
| * | crc32 module, clang spurious warning removal.David CARLIER2021-02-251-3/+7
| | | | | | | | | | | | Closes GH-6725.
* | | Speed up __sleep() and __wakeup() callsDmitry Stogov2021-02-253-35/+58
| | |
* | | Merge branch 'PHP-8.0'Nikita Popov2021-02-251-2/+2
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: mysqlnd pam fix test error message
| * | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-251-2/+2
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: mysqlnd pam fix test error message
| | * mysqlnd pam fix test error messageDaniel Black2021-02-251-2/+2
| | | | | | | | | | | | Closes GH-6727.
* | | Merge branch 'PHP-8.0'Nikita Popov2021-02-243-2/+3
|\ \ \ | |/ / | | | | | | | | | | | | | | | * PHP-8.0: Fix potential file collision in dom tests Fix bug #80757 (Exit code is 0 when could not open file) Update NEWS
| * | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-242-2/+2
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: Fix potential file collision in dom tests
| | * Fix potential file collision in dom testsNikita Popov2021-02-242-2/+2
| | |
| * | Merge branch 'PHP-7.4' into PHP-8.0Felipe Pena2021-02-241-0/+1
| |\ \ | | |/
| | * Fix bug #80757 (Exit code is 0 when could not open file)Felipe Pena2021-02-241-0/+1
| | |
| | * Update NEWSFelipe Pena2021-02-241-0/+3
| | |
* | | Switch few functions useful in Symphony apps to new ZPP API.Dmitry Stogov2021-02-243-21/+23
| | |
* | | Fixed error messageDmitry Stogov2021-02-2418-61/+77
| | |
* | | Allow pointer to end of memory in IS_UNSERIALIZED()Nikita Popov2021-02-241-2/+4
| | | | | | | | | | | | | | | | | | We already use <= for IS_SERIALIZED(), but the same general problem can also occur for IS_UNSERIALIZED(). We don't seem to hit this in practice prior to GH-5595 though.
* | | Merge branch 'PHP-8.0'Dmitry Stogov2021-02-242-4/+31
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Fixed bug #80782 (DASM_S_RANGE_VREG on PHP_INT_MIN-1)
| * | Fixed bug #80782 (DASM_S_RANGE_VREG on PHP_INT_MIN-1)Dmitry Stogov2021-02-243-4/+32
| | |
* | | zend_compile.c: fix typoDylan T2021-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Don't mind me, I just happened to be browsing this code. 🙃 Closes GH-6721. [ci skip]
* | | run-tests: add skip cacheMax Semenik2021-02-231-13/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently every --SKIPIF-- section in every test file results in 1 extra execution of PHP, every --EXTENSIONS-- section - in 2 executions. This is quite wasteful, as skip checking code is extremely repetitive and extensions are fixed for every binary/ini/command parameters combination. This patch adds caching to all such checks. On my machine, the gains are quite noticeable: 36s instead of 43s with -j16, 292s instead of 337s without concurrency. Cache stats are 3780 hits, 1247 misses in the latter case. In the future, tests could be adjusted to have more uniform skip checks to improve performance even more. Closes GH-6681.
* | | Merge branch 'PHP-8.0'Christoph M. Becker2021-02-231-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: run-tests: fixed exit code not being set on BORKED tests