#
c732ab40 |
| 16-Mar-2021 |
Dmitry Stogov |
Change Zend Stream API to use zend_string* instead of char*. This allows to eliminate re-calculation of string lenght and hash value. See the detailed list of changes in UPGRADING.INTERN
Change Zend Stream API to use zend_string* instead of char*. This allows to eliminate re-calculation of string lenght and hash value. See the detailed list of changes in UPGRADING.INTERNALS.
show more ...
|
Revision tags: php-7.3.19, php-7.4.7RC1, php-7.3.19RC1 |
|
#
47a2e5c7 |
| 18-May-2020 |
Nikita Popov |
Reference dynamic functions through dynamic_defs Currently, dynamically declared functions and closures are inserted into the function table under a runtime definition key, and then late
Reference dynamic functions through dynamic_defs 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.
show more ...
|
#
e5551d50 |
| 23-Feb-2021 |
Dylan T |
zend_compile.c: fix typo Don't mind me, I just happened to be browsing this code. Closes GH-6721. [ci skip] |
#
b3f4a310 |
| 22-Feb-2021 |
Nikita Popov |
Don't resolve special class names Adjust zend_resolve_class_name() to not resolve special class names. This avoids the need to only call this function after a preliminary check for n
Don't resolve special class names Adjust zend_resolve_class_name() to not resolve special class names. This avoids the need to only call this function after a preliminary check for non-default fetch types. Doing so is somewhat fragile when dynamic class names are involved. Fixes oss-fuzz #31139.
show more ...
|
#
a843c8a4 |
| 18-Feb-2021 |
Nikita Popov |
Fix crash during default value evaluation |
#
9619562d |
| 18-Feb-2021 |
Dmitry Stogov |
Properly relove self::CONSTANT at compile time |
#
6e988eae |
| 18-Feb-2021 |
Dmitry Stogov |
We don't need map_ptr slots for op_array.run_time_cache during preloading. |
#
5d160e30 |
| 17-Feb-2021 |
Nikita Popov |
Fix static variable behavior with inheritance When a method is inherited, the static variables will now always use the initial values, rather than the values at the time of inheritan
Fix static variable behavior with inheritance When a method is inherited, the static variables will now always use the initial values, rather than the values at the time of inheritance. As such, behavior no longer depends on whether inheritance happens before or after a method has been called. This is implemented by always keeping static_variables as the original values, and static_variables_ptr as the modified copy. Closes GH-6705.
show more ...
|
#
643a727c |
| 15-Feb-2021 |
Nikita Popov |
Merge branch 'PHP-8.0' * PHP-8.0: Fix assertion failure in cufa optimization with named args
|
#
c7022020 |
| 15-Feb-2021 |
Nikita Popov |
Fix assertion failure in cufa optimization with named args Fixes oss-fuzz#30764. |
#
e1fda102 |
| 10-Feb-2021 |
Dmitry Stogov |
Link unbound simple classes (without parent/intefaces/traits) in first place. |
#
ef516481 |
| 10-Feb-2021 |
Dmitry Stogov |
Use zend_type.ce_cache__ptr for caching class resulution during argument/result type checks |
#
4b79dba9 |
| 09-Feb-2021 |
Dmitry Stogov |
Added Inheritance Cache. This is a new transparent technology that eliminates overhead of PHP class inheritance. PHP classes are compiled and cached (by opcahce) separately, howeve
Added Inheritance Cache. This is a new transparent technology that eliminates overhead of PHP class inheritance. PHP classes are compiled and cached (by opcahce) separately, however their "linking" was done at run-time - on each request. The process of "linking" may involve a number of compatibility checks and borrowing methods/properties/constants form parent and traits. This takes significant time, but the result is the same on each request. Inheritance Cache performs "linking" for unique set of all the depending classes (parent, interfaces, traits, property types, method types involved into compatibility checks) once and stores result in opcache shared memory. As a part of the this patch, I removed limitations for immutable classes (unresolved constants, typed properties and covariant type checks). So now all classes stored in opcache are "immutable". They may be lazily loaded into process memory, if necessary, but this usually occurs just once (on first linking). The patch shows 8% improvement on Symphony "Hello World" app.
show more ...
|
#
27cd7a11 |
| 07-Jan-2021 |
Nikita Popov |
Add support for string keys in array unpacking This adds support for: $array1 = ['a' => 1, 'b' => 2]; $array2 = ['b' => 3, 'c' => 4]; $array = [...$array1, ...$a
Add support for string keys in array unpacking This adds support for: $array1 = ['a' => 1, 'b' => 2]; $array2 = ['b' => 3, 'c' => 4]; $array = [...$array1, ...$array2]; // => ['a' => 1, 'b' => 3, 'c' => 4] RFC: https://wiki.php.net/rfc/array_unpacking_string_keys Closes GH-6584.
show more ...
|
#
6bc97b59 |
| 25-Jan-2021 |
Nikita Popov |
Merge branch 'PHP-8.0' * PHP-8.0: Improve switch continue warning
|
#
18507853 |
| 25-Jan-2021 |
Nikita Popov |
Improve switch continue warning Don't suggest "continue N+1" if there is no wrapping loop. The resulting code would be illegal. |
#
321bd6b1 |
| 25-Jan-2021 |
Nikita Popov |
Improve error message for leading comma in keyed list assignment Print "Cannot use empty array entries in keyed array assignment" instead of "Cannot mix keyed and unkeyed array entries i
Improve error message for leading comma in keyed list assignment Print "Cannot use empty array entries in keyed array assignment" instead of "Cannot mix keyed and unkeyed array entries in assignments" for a leading comma.
show more ...
|
#
9862296d |
| 18-Jan-2021 |
Nikita Popov |
Fix $GLOBALS[] in isset and unset I've previously addressed the case of assignments, but the same issue exists for isset and unset. Fixes oss-fuzz #29699. |
#
21562aa9 |
| 15-Jan-2021 |
Nikita Popov |
Check for append to $GLOBALS Fixes oss-fuzz #29389. |
#
3e01f5af |
| 15-Jan-2021 |
Nikita Popov |
Replace zend_bool uses with bool We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool
Replace zend_bool uses with bool We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
show more ...
|
#
ad5ae063 |
| 14-Jan-2021 |
Nikita Popov |
Merge branch 'PHP-8.0' * PHP-8.0: Fixed bug #80596: Fix anonymous class union typehint errors
|
#
f9fbba41 |
| 13-Jan-2021 |
Daniil Gentili |
Fixed bug #80596: Fix anonymous class union typehint errors Cut off part after null byte when resolving the class name, to avoid cutting off a larger part lateron. Closes GH-660
Fixed bug #80596: Fix anonymous class union typehint errors Cut off part after null byte when resolving the class name, to avoid cutting off a larger part lateron. Closes GH-6601.
show more ...
|
#
1a44599d |
| 12-Jan-2021 |
Dmitry Stogov |
Always use CG(arena) for unin type lists |
#
3c68f38f |
| 02-Dec-2020 |
Nikita Popov |
Restrict allowed usages of $GLOBALS This restricts allowed usage of $GLOBALS, with the effect that plain PHP arrays can no longer contain INDIRECT elements. RFC: https://wiki.ph
Restrict allowed usages of $GLOBALS This restricts allowed usage of $GLOBALS, with the effect that plain PHP arrays can no longer contain INDIRECT elements. RFC: https://wiki.php.net/rfc/restrict_globals_usage Closes GH-6487.
show more ...
|
#
5dfec886 |
| 01-Dec-2020 |
Nikita Popov |
Fix use after free with file cache and arena allocated strings |