summaryrefslogtreecommitdiff
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* Don't assume libmysqlclient library nameNikita Popov2020-11-122-50/+7
| | | | | | | | | By simply dropping the additional checks, in line with the general guideline of trusting the output of config scripts (this should be migrated to pkg-config though). Also drop the code for manually adding -z if mysql_config does not -- that's not our problem.
* Fix memory leak when user filter onCreate returns falseNikita Popov2020-11-122-1/+26
|
* Fix memory leak with bcsqrt on number 0<X<1Nikita Popov2020-11-122-1/+3
|
* Fix reflection getDefaultValue() with user arg infoNikita Popov2020-11-122-1/+17
| | | | | The default value is part of the op_array in that case, but we have no way to access it. Fail gracefully.
* Fixed incorrectly eliminated type storeDmitry Stogov2020-11-111-18/+18
|
* Remove assertionDmitry Stogov2020-11-111-1/+2
|
* Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-11-113-2/+83
|\ | | | | | | | | * PHP-7.4: Handle errors during next_result()
| * Handle errors during next_result()Nikita Popov2020-11-113-2/+83
| |
* | Fixed incorrect invariant guard motionDmitry Stogov2020-11-111-1/+2
| |
* | Stop on fake frameDmitry Stogov2020-11-111-1/+1
| |
* | Fixed reference-counting propagationDmitry Stogov2020-11-111-0/+3
| |
* | Fix double free when socket_accept failsNikita Popov2020-11-112-1/+12
| |
* | Retain reference to share handle from curl handleNikita Popov2020-11-113-1/+42
| | | | | | | | | | | | | | | | Not keeping a reference will not result in use after free, because curl protects against it, but it will result in a memory leak, because curl_share_cleanup() will fail. We should make sure that the share handle object stays alive as long as the curl handles use it.
* | [Observer+JIT] Save opline before calling begin/end handlersDmitry Stogov2020-11-112-1/+5
| |
* | [Observer] Save opline before calling begin/end handlersDmitry Stogov2020-11-112-0/+66
| |
* | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-11-093-8/+35
|\ \ | |/ | | | | | | * PHP-7.4: Fix phi use chain management when renaming variable
| * Fix phi use chain management when renaming variableNikita Popov2020-11-093-8/+35
| | | | | | | | | | | | | | If there is a previous use of the new variable in the phi, we need to NULL out the use chain of the new source we're adding. Test case is reduced from an assertion failure in the Symfony Demo.
* | Use true/false instead of TRUE/FALSE in intlNikita Popov2020-11-097-18/+18
| | | | | | | | And drop the U_DEFINE_TRUE_AND_FALSE flag.
* | Remove embedded property from mysqli_driverDharman2020-11-095-24/+0
| | | | | | | | | | | | | | All other leftovers of this feature have been dropped in PHP 8, so we should remove the property as well. Closes GH-6407.
* | Fixed missaligned accessDmitry Stogov2020-11-091-2/+2
| |
* | Skip preload test under asanNikita Popov2020-11-091-0/+1
| | | | | | | | | | Just like the other preload tests with startup failures, this may cause leaks.
* | Rename PhpToken::getAll() to PhpToken::tokenize()Nikita Popov2020-11-0910-16/+16
| | | | | | | | | | See https://externals.io/message/112189. Fixes bug #80328.
* | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-11-068-4/+701
|\ \ | |/ | | | | | | * PHP-7.4: Split tests for compatibility with ICU 68.1
| * Split tests for compatibility with ICU 68.1Christoph M. Becker2020-11-068-4/+701
| |
| * Backport preloading trait fixup fixesNikita Popov2020-11-053-19/+69
| | | | | | | | | | | | | | | | | | This cherry-picks 33969c2252b2c33a72c9039072af8862fd347a5f and 2effbfd8713936742ef46e6e85ce193b320ac005 from PHP-8.0. The issues these commits fix could also manifest in PHP 7.4, and a commenter on bug #80307 reports this this might indeed be happening.
* | Raise E_WARNING on PHP related errorsChristoph M. Becker2020-11-064-2/+10
| | | | | | | | | | | | | | | | | | If Zip operations fails due to PHP error conditions before libzip even has been called, there is no meaningful indication what failed; the functions just return false, and the Zip status indicated that no error did occur. Therefore we raise `E_WARNING` in these cases. Closes GH-6356.
* | Move stack overflow checks out of the loopsDmitry Stogov2020-11-064-49/+131
| |
* | report about ZSTD compression availabilityRemi Collet2020-11-061-0/+6
| |
* | only display libzip both headers/library versions if they differRemi Collet2020-11-061-4/+7
| |
* | Fixed incorrect invariant guard motionDmitry Stogov2020-11-051-1/+3
| |
* | Fixup trait methods even if no traits are usedNikita Popov2020-11-053-6/+18
| | | | | | | | | | | | Trait methods might be non-trivially inherited, in which case we may have to perform fixup in classes that do not directly use any traits.
* | Fix multiple trait fixupNikita Popov2020-11-053-15/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a trait method is inherited, preloading trait fixup might be performed on it multiple times. Usually this is fine, because the opcodes pointer will have already been updated, and will thus not be found in the xlat table. However, it can happen that the new opcodes pointer is the same as one of the old opcodes pointers, if the pointer has been reused by the allocator. In this case we will look up the wrong op array and overwrite the trait method with an unrelated trait method. We fix this by indexing the xlat table not by the opcodes pointer, but by the refcount pointer. The refcount pointer is not changed during optimization, and accurately represents which op arrays should use the same opcodes. Fixes bug #80307. The test case does not reproduce the bug, because this depends on a lot of "luck" with the allocator. The test case merely illustrates a case where orig_op_array would have been NULL in the original code.
* | End output handlers in preload shutdownNikita Popov2020-11-041-0/+1
| | | | | | | | | | | | Same as in php_request_shutdown(), we need to end any active output handlers, as these may no longer be safe to execute lateron.
* | getlastmod() can return falseNikita Popov2020-11-042-3/+3
| | | | | | | | At least this can happen during preloading.
* | Fix static variable in methods inheritance during preloadingNikita Popov2020-11-042-0/+40
| | | | | | | | | | This is now "bug compatible" with the normal behavior, and more imporantly, does not crash :)
* | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-11-045-6/+23
|\ \ | |/ | | | | | | * PHP-7.4: Fix #80266: parse_url silently drops port number 0
| * Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-11-045-8/+23
| |\ | | | | | | | | | | | | * PHP-7.3: Fix #80266: parse_url silently drops port number 0
| | * Fix #80266: parse_url silently drops port number 0Christoph M. Becker2020-11-045-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of commit 81b2f3e[1], `parse_url()` accepts URLs with a zero port, but does not report that port, what is wrong in hindsight. Since the port number is stored as `unsigned short` there is no way to distinguish between port zero and no port. For BC reasons, we thus introduce `parse_url_ex2()` which accepts an output parameter that allows that distinction, and use the new function to fix the behavior. The introduction of `parse_url_ex2()` has been suggested by Nikita. [1] <http://git.php.net/?p=php-src.git;a=commit;h=81b2f3e5d9fcdffd87a4fcd12bd8c708a97091e1> Closes GH-6399.
* | | Assert that references are not persistedNikita Popov2020-11-042-20/+2
| | | | | | | | | | | | | | | | | | There should not be any need to persist references, and it's unlikely that persisting a reference will behave correctly at runtime, because we don't have a concept of an immutable reference.
* | | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-11-042-0/+22
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix dynamic function definition in preload script
| * | Fix dynamic function definition in preload scriptNikita Popov2020-11-042-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | We should use normal function renaming if the function is declared during preloading itself, rather than afterwards. This fixes a regression introduced by 68f80be9d1380de731930187250a7ed6b55ae196.
* | | Don't disable early binding during preloading scriptNikita Popov2020-11-032-0/+21
| | | | | | | | | | | | | | | | | | | | | We should only disable early binding during the opcache_compile_file() calls, not inside the preloading script or anything it includes. The right condition to check for is whether we compile the file without execution, as declaring classes is "execution".
* | | Report parse errors during preloadingNikita Popov2020-11-033-0/+22
| | |
* | | Fix use of type copy ctor when importing trait propertiesNikita Popov2020-11-033-0/+28
| | | | | | | | | | | | | | | We shouldn't call the copy constructor inside the original type, duh.
* | | Allow unlinked classes when performing in_compilation variance checkNikita Popov2020-11-031-0/+2
| | | | | | | | | | | | | | | As preloading runs in in_compilation mode, we also need to allow use of unlinked classes in lookup_class().
* | | Fix variance checks on resolved union typesNikita Popov2020-11-031-0/+2
| | | | | | | | | | | | | | | | | | This is a bit annoying: When preloading is used, types might be resolved during inheritance checks, so we need to deal with CE types rather than just NAME types everywhere.
* | | Don't ignore internal classes during preloadingNikita Popov2020-11-032-1/+2
| | | | | | | | | | | | | | | | | | When preloading, it's fine to make use of internal class information, as we do not support Windows. It is also necessary to allow proper variance checks against internal classes.
* | | Fix persisting property info table with internal parentNikita Popov2020-11-033-1/+30
| | | | | | | | | | | | | | | If the property info comes from an internal parent, we won't have an xlat entry for it. Leave it alone in that case.
* | | Preserve trait method alias name during preloadingNikita Popov2020-11-033-0/+31
| | |
* | | Rename opcache.jit_max_loops_unroll to opcache.jit_max_loop_unrollsNikita Popov2020-11-023-4/+4
| | |