summaryrefslogtreecommitdiff
path: root/Zend
Commit message (Collapse)AuthorAgeFilesLines
* Fixed bug #80617: Type narrowing warning in ZEND_TYPE_INIT_CODENikita Popov2021-01-141-1/+1
|
* Fixed bug #80596: Fix anonymous class union typehint errorsDaniil Gentili2021-01-142-3/+43
| | | | | | | Cut off part after null byte when resolving the class name, to avoid cutting off a larger part lateron. Closes GH-6601.
* Add support for union types for internal functionsNikita Popov2021-01-122-15/+56
| | | | | | | | | This closes the last hole in the supported types for internal function arginfo types. It's now possible to represent unions of multiple classes. This is done by storing them as TypeA|TypeB and PHP will then convert this into an appropriate union type list. Closes GH-6581.
* Fix infinite recursion in unlinked_instanceofNikita Popov2021-01-052-1/+19
| | | | | | | I suspect this is only a partial fix for the issue, it's probably possible to recurse through a more complex pathway as well. Fixes oss-fuzz #28961.
* Fix bug #80537Nikita Popov2020-12-211-4/+12
| | | | | | | | This is an unavoidable breaking change to both the type and parameter name. The assertion that was supposed to prevent this was overly lax and accepted any object type for string parameters.
* PDO MySQL: Use mysqlnd column namesNikita Popov2020-12-161-0/+13
| | | | | | | | | mysqlnd already creates interned zend_strings for us, so let's make use of them. This also required updating the PDO case changing code to work with potentially shared strings. For the lowercasing, use the optimized zend_string_tolower() implementation.
* Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-12-161-3/+3
|\ | | | | | | | | * PHP-7.4: Fix bug #80523
| * Fix bug #80523Nikita Popov2020-12-161-3/+3
| | | | | | | | | | | | | | | | Don't truncate the file length to unsigned int... I have no idea whether that fully fixes the problem because the process gets OOM killed before finishing, but at least the immediate parse error is gone now.
* | Next is 8.0.2Gabriel Caruso2020-12-151-1/+1
| |
* | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-12-152-3/+4
|\ \ | |/ | | | | | | * PHP-7.4: IBM i PASE doesn't support ITIMER_PROF
| * IBM i PASE doesn't support ITIMER_PROFCalvin Buckley2020-12-152-3/+4
| | | | | | | | | | | | | | | | | | | | Like Cygwin, this platform needs to use a real-time timer. This was based on a patch by @kadler, but it didn't handle unsetting the timer, so the timeout would continue to be active, triggering `hard_timeout` unexpectedly. The patch is fixed to handle unsetting. Closes GH-6503.
* | EXTERN_C wrapping for GC buffer APIstwosee2020-12-101-2/+2
| | | | | | | | Closes GH-6502.
* | Fix removal of type source during unserializationNikita Popov2020-12-041-0/+1
| | | | | | | | | | | | | | Missed a check for info in this code. Add it, and add an assertion in type source removal to make it easier to catch this issue. Fixes oss-fuzz #28208 and #28257.
* | Fixed bug #80462Nikita Popov2020-12-021-1/+1
| |
* | Disable stack reuse optimization for x86 PIC code. It may clobber local ↵Dmitry Stogov2020-12-012-2/+2
| | | | | | | | variable used for Global Offset Table.
* | Don't use scope when validating AttributeNikita Popov2020-12-012-1/+13
| | | | | | | | | | | | | | This is not safe to do at this point. Even if we made it safe, we'd see inconsistencies due to a partially compiled class. Fixes oss-fuzz #28129.
* | Fix use after free with file cache and arena allocated stringsNikita Popov2020-12-011-1/+3
| |
* | Don't mark cpu_supports functions as always inlineNikita Popov2020-12-011-16/+16
| | | | | | | | | | | | The use of no-sanitize may result in an inlining failure, which will be promoted into a compile error by always-inline. Use a normal inlining hint without enforcing it.
* | Preallocate stack space for JIT in execute_ex() to eliminate JIT ↵Dmitry Stogov2020-11-304-14/+69
| | | | | | | | prologue/epilogue.
* | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-11-271-4/+10
|\ \ | |/ | | | | | | * PHP-7.4: Fix build for non-x86
| * Fix build for non-x86Nikita Popov2020-11-271-4/+10
| |
* | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-11-271-0/+37
|\ \ | |/ | | | | | | * PHP-7.4: Fix AVX detection
| * Fix AVX detectionNikita Popov2020-11-271-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Our CPU detection code currently only checks whether hardware support for AVX exists. However, we also need to check for operating system support for XSAVE, as well as whether XCR0 has the SSE and AVX bits set. If this is not the case, unset the AVX and AVX2 bits in the cpuinfo structure. Hopefully this resolves our issues with CPU support detection. Closes GH-6460.
| * Fixed bug #80362: Running dtrace scripts can cause php to crashNikita Popov2020-11-241-1/+3
| | | | | | | | Patch by al at coralnet dot name.
* | Make sure zend_cpu_supports_pclmul() is always definedNikita Popov2020-11-271-15/+14
| | | | | | | | | | If __builtin_cpu_supports() is available, but doesn't have support for pclmul, the function would end up not being defined at all.
* | Assert that cpuinfo is initialized before useNikita Popov2020-11-272-3/+4
| | | | | | | | And fix some incorrect indentation.
* | Remove -dev from ZEND_VERSIONSara Golemon2020-11-261-1/+1
| |
* | Fixed bug #80377Nikita Popov2020-11-251-6/+0
| | | | | | | | | | | | | | | | | | | | | | Make sure the $PHP_THREAD_SAFETY variable is always available when configuring extensions. It was previously available for phpized extensions, but for in-tree builds it was being set too late. Then, use $PHP_THREAD_SAFETY instead of $enable_zts to check for ZTS in bundled extensions, which makes sure these checks also work for phpize builds.
* | Fixed bug #80404Nikita Popov2020-11-241-0/+11
| | | | | | | | | | | | | | | | | | | | For a division like [1..1]/[2..2] produce [0..1] as a result, which would be the integer envelope of the floating-point result. The implementation is pretty ugly (we're now taking min/max across eight values...) but I couldn't come up with a more elegant way to handle this that doesn't make things a lot more complex (the division sign handling is the annoying issue here).
* | Fixed bug #80391Nikita Popov2020-11-242-0/+27
| | | | | | | | | | Iterable was not considered a subtype of array|object, and thus also not a subtype of mixed.
* | Remove some incorrect mixed parameter typesMáté Kocsis2020-11-212-5/+5
| |
* | Export zend_is_callable_at_frameNikita Popov2020-11-192-2/+5
| | | | | | | | | | | | Export the zend_is_callable_impl() function as zend_is_callable_at_frame() for use by extension. As twose pointed out, an extension may want to retrieve fcc for a private method.
* | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-11-182-0/+35
|\ \ | |/ | | | | | | * PHP-7.4: Short-circuit get_gc for currently running generator
| * Short-circuit get_gc for currently running generatorNikita Popov2020-11-182-0/+35
| |
* | Provide unused retvals to observersSammy Kaye Powers2020-11-173-46/+100
| | | | | | | | | | | | | | Make sure that the return value is available to observers, even if it is not used by the caller. Closes GH-6422.
* | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-11-171-0/+19
|\ \ | |/ | | | | | | * PHP-7.4: Fix incorrectly optimized out live range
| * Fix incorrectly optimized out live rangeNikita Popov2020-11-171-0/+19
| | | | | | | | | | | | | | For x ? y : z style structures, the live range starts at z, but may also hold the value of y. Make sure that the refcounting check takes this into account, by checking the type of a potential phi user.
* | Fire open observer end handlers after a zend_bailoutSammy Kaye Powers2020-11-162-1/+29
| | | | | | | | Closes GH-6377
* | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-11-164-15/+19
|\ \ | |/ | | | | | | * PHP-7.4: Fix #74558: Can't rebind closure returned by Closure::fromCallable()
| * Fix #74558: Can't rebind closure returned by Closure::fromCallable()Christoph M. Becker2020-11-164-15/+19
| | | | | | | | | | | | | | | | Failure to rebind such closures is not necessarily related to them being created by `ReflectionFunctionAbstract::getClosure()`, so we fix the error message. Closes GH-6424.
* | [Observer] Save opline before calling begin/end handlersDmitry Stogov2020-11-113-13/+45
| |
* | Fixed bug #80334Nikita Popov2020-11-092-6/+41
| | | | | | | | | | If assert() was called with named args, add description as named arg as well.
* | Fix static variable in methods inheritance during preloadingNikita Popov2020-11-041-7/+9
| | | | | | | | | | This is now "bug compatible" with the normal behavior, and more imporantly, does not crash :)
* | Don't xfail method_static_var.phptNikita Popov2020-11-041-16/+11
| | | | | | | | | | | | | | | | Let's test the current behavior here. It might not be right, but it's long-standing behavior. Nearly missed an assertion failure here because the test was XFAILed...
* | Don't disable opcache for generic testsNikita Popov2020-11-049-18/+0
| | | | | | | | | | Even if the original issue only reproduces without opcache, we should still allow running them with and without opcache.
* | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-11-041-1/+2
|\ \ | |/ | | | | | | * PHP-7.4: Fix dynamic function definition in preload script
| * Fix dynamic function definition in preload scriptNikita Popov2020-11-041-1/+2
| | | | | | | | | | | | | | | | 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-031-1/+1
| | | | | | | | | | | | | | 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".
* | Fix use of type copy ctor when importing trait propertiesNikita Popov2020-11-031-2/+3
| | | | | | | | | | We shouldn't call the copy constructor inside the original type, duh.
* | Allow unlinked classes when performing in_compilation variance checkNikita Popov2020-11-031-4/+2
| | | | | | | | | | As preloading runs in in_compilation mode, we also need to allow use of unlinked classes in lookup_class().