#
68f80be9 |
| 28-Oct-2020 |
Dmitry Stogov |
Fixed run-time binding of preloaded dynamically declared function |
#
f9b7609d |
| 12-Oct-2020 |
Nikita Popov |
Fixed bug #80225 Namespaced and declares have a different interpretation of what "first statement" means. |
#
36ed9966 |
| 22-Sep-2020 |
Nikita Popov |
Allow attributes to be applied to property/constant groups Remove arbitrary restriction that attributes cannot be applied to property/constant groups. The attribute applies to a
Allow attributes to be applied to property/constant groups Remove arbitrary restriction that attributes cannot be applied to property/constant groups. The attribute applies to all elements of the group, just like modifiers and types do. See also https://externals.io/message/111914. Closes GH-6186.
show more ...
|
#
2772751b |
| 27-Sep-2020 |
Nikita Popov |
Make constexpr compilation robust against multiple compilation Instead of setting the old AST type to zero, replace the AST with the compiled constexpr AST zval. This requires passing in
Make constexpr compilation robust against multiple compilation Instead of setting the old AST type to zero, replace the AST with the compiled constexpr AST zval. This requires passing in a zend_ast** instead of a zend_ast*. This allows compiling ASTs containing constexprs multiple times -- the second time, the existing compiled representation will be resused. This means we no longer need to copy the attributes AST for promoted properties.
show more ...
|
#
5686c16d |
| 23-Sep-2020 |
Nikita Popov |
Honor strict_types=1 for attributes, improve backtraces Make ReflectionAttribute::newInstance() respect the strict_types=1 declaration at the attribute use-site. More generally, pretend
Honor strict_types=1 for attributes, improve backtraces Make ReflectionAttribute::newInstance() respect the strict_types=1 declaration at the attribute use-site. More generally, pretend that we are calling the attribute constructor from the place where the attribute is used, which also means that the attribute location will show up properly in backtraces and inside "called in" error information. This requires us to store the attributes strict_types scope (as flags), as well as the attribute line number. The attribute filename can be recovered from the symbol it is used on. We might want to expose the attribute line number via reflection as well. See also https://externals.io/message/111915. Closes GH-6201.
show more ...
|
#
c5f93d19 |
| 21-Sep-2020 |
Nikita Popov |
Fix detection of code outside namespace Due to improvements to early binding, the opcode based check is no longer accurate. Reuse the syntactic check we're already using for declares
Fix detection of code outside namespace Due to improvements to early binding, the opcode based check is no longer accurate. Reuse the syntactic check we're already using for declares instead.
show more ...
|
#
34bb5ba2 |
| 18-Sep-2020 |
Nikita Popov |
Remove support for EXT_NOP This is an annoying edge case that regularly gets broken. As we're not aware of significant users of this API, and there are other ways to hook this, remov
Remove support for EXT_NOP This is an annoying edge case that regularly gets broken. As we're not aware of significant users of this API, and there are other ways to hook this, remove support for EXT_NOP.
show more ...
|
#
16b9f196 |
| 15-Sep-2020 |
Nikita Popov |
Fix compile-time/run-time discrepancies with unary operators This addresses two issues: * ~ throws for a number of types, and we should not compile-time evaluate in that case. Ad
Fix compile-time/run-time discrepancies with unary operators This addresses two issues: * ~ throws for a number of types, and we should not compile-time evaluate in that case. Add a check similar to what we do for binary ops. * Unary +/- may produce a different error message due to canonicalization of the constant operand to the RHS. To avoid this, put the constant operand on the RHS right away. Fixes oss-fuzz #25649.
show more ...
|
#
09904242 |
| 06-Sep-2020 |
Tyson Andre |
Avoid gap in AST_CLASS child nodes for attributes See https://github.com/nikic/php-ast/pull/181 > Hm, I'm thinking it would make more sense to change the structure in php-src. >
Avoid gap in AST_CLASS child nodes for attributes See https://github.com/nikic/php-ast/pull/181 > Hm, I'm thinking it would make more sense to change the structure in php-src. > All the function types have consistent AST structure, but there's no reason at > all why classes should be consistent with functions. It's unusual to have an unused child node between other child nodes that are used (for name, extends, implements, and attributes of AST_CLASS) > That gap is a leftover from a previous refactoring. An earlier version of > attributes extended `zend_ast_decl` with a new member called `attributes` and > therefore did not need to handle functions and classes in different ways. Closes GH-6088
show more ...
|
#
8a49310f |
| 05-Sep-2020 |
Ilija Tovilo |
Adjust assignment line number for match Otherwise the assignment will have the same number as the default arm which will 1. mis-trigger a breakpoint and 2. mark the line as covered e
Adjust assignment line number for match Otherwise the assignment will have the same number as the default arm which will 1. mis-trigger a breakpoint and 2. mark the line as covered even when it isn't. Closes GH-6083
show more ...
|
#
f5dbebd8 |
| 07-Sep-2020 |
Nikita Popov |
Accept zend_string instead of zval in zend_compile_string |
#
9464576f |
| 03-Sep-2020 |
Nikita Popov |
Fix leaks in sapi tests Make sure to always free compiled_filename on shutdown. |
#
7620ea15 |
| 03-Sep-2020 |
Nikita Popov |
Don't intern compiled_filename For php-ast interning the file name is an effective memory leak, see php-ast#134. I don't think there's any reason to do this. At some point this
Don't intern compiled_filename For php-ast interning the file name is an effective memory leak, see php-ast#134. I don't think there's any reason to do this. At some point this was needed due to bugs in the interned string mechanism that caused issues if the string was later interned, e.g. through a __FILE__ reference. These issues have since been resolved. In conjunction with the filenames_table removal in c4016ecd446ef26bb3dc77735b6e441e151ea985 this means that filenames now need to be refcounted like normal strings. In particular the filename reference in op_arrays and CEs are refcounted.
show more ...
|
#
c4016ecd |
| 03-Sep-2020 |
Nikita Popov |
Remove CG(filenames_table) This doesn't seem to serve any purpose anymore. |
#
8b37c1e9 |
| 15-Aug-2020 |
Benjamin Eberlei |
Change Attribute Syntax from @@ to #[] |
#
8b6b2bda |
| 02-Sep-2020 |
Nikita Popov |
Fix by-ref list assign LIST_W+MAKE_REF separation Shift the responsibility for emitting MAKE_REF to the list assignment code, to make sure that LIST_W and MAKE_REF are directly adjacent,
Fix by-ref list assign LIST_W+MAKE_REF separation Shift the responsibility for emitting MAKE_REF to the list assignment code, to make sure that LIST_W and MAKE_REF are directly adjacent, and there are no opcodes in between that could modify the LIST_W result. Additionally, adjust the zend_wrong_string_offset() code to not perform a loop over opcodes and assert that the next opcode is a relevant one. The VM write-safety model requires this. This is a followup to a07c1f56aac1c0f6c8334760009b678cbf9d6138 and the full fix for oss-fuzz #25352.
show more ...
|
#
2022f2e5 |
| 31-Aug-2020 |
Nikita Popov |
Fix nullsafe operator with delayed oplines Closes GH-6056. |
#
86364013 |
| 28-Aug-2020 |
Nikita Popov |
Avoid ubsan warning with dummy cache slot addr |
#
fa8d9b11 |
| 28-Aug-2020 |
George Peter Banyard |
Improve type declarations for Zend APIs Voidification of Zend API which always succeeded Use bool argument types instead of int for boolean arguments Use bool return type for functio
Improve type declarations for Zend APIs Voidification of Zend API which always succeeded Use bool argument types instead of int for boolean arguments Use bool return type for functions which return true/false (1/0) Use zend_result return type for functions which return SUCCESS/FAILURE as they don't follow normal boolean semantics Closes GH-6002
show more ...
|
#
1b2ec73c |
| 26-Aug-2020 |
George Peter Banyard |
Drop various unused macros/APIs Also convert_libmagic_pattern() to return a zend_string* Closes GH-6029 |
#
1954aed7 |
| 26-Aug-2020 |
Nikita Popov |
Fix over-eager named params optimization We can't relax a named param to a positional param if we encountered any unknown parameters in the meantime. |
#
227f1f14 |
| 11-Aug-2020 |
Nikita Popov |
Fix nullsafe operator on $this |
#
a4c015b4 |
| 03-Aug-2020 |
Nikita Popov |
Fix handling of nullsafe method in empty() Fixes oss-fuzz #24627. |
Revision tags: php-7.4.6, php-7.2.31, php-7.4.6RC1, php-7.3.18RC1, php-7.2.30, php-7.4.5, php-7.3.17 |
|
#
d92229d8 |
| 06-Apr-2020 |
Nikita Popov |
Implement named parameters From an engine perspective, named parameters mainly add three concepts: * The SEND_* opcodes now accept a CONST op2, which is the argument nam
Implement named parameters From an engine perspective, named parameters mainly add three concepts: * The SEND_* opcodes now accept a CONST op2, which is the argument name. For now, it is looked up by linear scan and runtime cached. * This may leave UNDEF arguments on the stack. To avoid having to deal with them in other places, a CHECK_UNDEF_ARGS opcode is used to either replace them with defaults, or error. * For variadic functions, EX(extra_named_params) are collected and need to be freed based on ZEND_CALL_HAS_EXTRA_NAMED_PARAMS. RFC: https://wiki.php.net/rfc/named_params Closes GH-5357.
show more ...
|
#
f475edc2 |
| 25-Jul-2020 |
Deus Kane <3399275+qxzkjp@users.noreply.github.com> |
Fixed bug #79897: Promoted constructor params with attribs cause crash This was caused by the attribute AST being used twice, and was fixed by creating a temporary copy of it (and destro
Fixed bug #79897: Promoted constructor params with attribs cause crash This was caused by the attribute AST being used twice, and was fixed by creating a temporary copy of it (and destroying said copy) when neccesary.
show more ...
|