#
9975986b |
| 16-Aug-2020 |
Máté Kocsis |
Improve error messages mentioning parameters instead of arguments Closes GH-5999
|
#
f5dbebd8 |
| 07-Sep-2020 |
Nikita Popov |
Accept zend_string instead of zval in zend_compile_string
|
#
66c3e900 |
| 01-Sep-2020 |
Levi Morrison |
Add zend_observer API Closes GH-5857. Co-authored-by: Nikita Popov <nikita.ppv@gmail.com> Co-authored-by: Sammy Powers <sammyk@datadoghq.com>
|
#
061c708a |
| 31-Aug-2020 |
Nikita Popov |
Correctly report failure in zend_handle_undef_args() And do the check before increfing the closure object, otherwise we'd have to release it as well. Fixes oss-fuzz #25313.
|
#
e81becce |
| 31-Aug-2020 |
Nikita Popov |
Fix trampoline leak in array_map
|
#
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 ...
|
#
df5011f5 |
| 28-Aug-2020 |
Nikita Popov |
Export and reuse zend_is_valid_class_name API Unserialization does the same check as zend_lookup_class, so let's share the same optimized implementation.
|
#
7a6ae9b1 |
| 24-Aug-2020 |
Nikita Popov |
Fix refcounting for the named params case as well Adjust the test case to pass a refcounted value and to also check the named params case.
|
#
bb54694f |
| 24-Aug-2020 |
Nikita Popov |
Fix refcounting
|
#
6b6c2c00 |
| 24-Aug-2020 |
Christoph M. Becker |
Fix #79979: passing value to by-ref param via CUFA crashes If a by-val send is not allowed, we must not do so. Instead we wrap the value in a temporary reference. Closes GH-6000
|
#
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 ...
|
#
c206c742 |
| 29-Jul-2020 |
Nikita Popov |
Fix bug #79900 Run debug build shutdown GC regardless even if GC has been disabled. Of course, this only does something meaningful if the GC has been disabled at runtime and root col
Fix bug #79900 Run debug build shutdown GC regardless even if GC has been disabled. Of course, this only does something meaningful if the GC has been disabled at runtime and root collection is still enabled. We cannot prevent leaks if GC is disabled completely.
show more ...
|
#
d30cd7d7 |
| 26-May-2020 |
Máté Kocsis |
Review the usage of apostrophes in error messages Closes GH-5590
|
#
302933da |
| 07-Jul-2020 |
Nikita Popov |
Remove no_separation flag
|
#
75c4e613 |
| 06-Jul-2020 |
Nikita Popov |
Correctly determine arg name of USER_ARG_INFO functions
|
#
795d2cbd |
| 06-Jul-2020 |
Nikita Popov |
Reuse warning function
|
#
75a04eac |
| 06-Mar-2020 |
Nikita Popov |
Make exit() unwind properly exit() is now internally implemented by throwing an exception, performing a normal stack unwind and a clean shutdown. This ensures that no persistent reso
Make exit() unwind properly exit() is now internally implemented by throwing an exception, performing a normal stack unwind and a clean shutdown. This ensures that no persistent resource leaks occur. The exception is internal, cannot be caught and does not result in the execution of finally blocks. This may be relaxed in the future. Closes GH-5768.
show more ...
|
#
1c74bab8 |
| 10-Jun-2020 |
Nikita Popov |
More efficient check for valid class name Use a bitset of valid characters instead of strspn. This is both more efficient and more compact.
|
#
5b59d491 |
| 09-Jun-2020 |
Nikita Popov |
Cleanup SPL autoload implementation Replace EG(autoload_func) with a C level zend_autoload hook. This avoids having to do one indirection through PHP function calls. The need for EG(
Cleanup SPL autoload implementation Replace EG(autoload_func) with a C level zend_autoload hook. This avoids having to do one indirection through PHP function calls. The need for EG(autoload_func) was a leftover from the __autoload() implementation. Additionally, drop special-casing of spl_autoload(), and instead register it just like any other autoloading function. This fixes bug #71236 as a side-effect. Finally, change spl_autoload_functions() to always return an array. The distinction between false and an empty array no longer makes sense here. Closes GH-5696.
show more ...
|
#
e56e53a5 |
| 09-Jun-2020 |
Nikita Popov |
Back up fake_scope in zend_call_function We regularly find new places where we forgot to reset fake_scope. Instead of having to handle this for each caller of zend_call_function() an
Back up fake_scope in zend_call_function We regularly find new places where we forgot to reset fake_scope. Instead of having to handle this for each caller of zend_call_function() and similar APIs, handle it directly in zend_call_function().
show more ...
|
#
257dbb04 |
| 08-Jun-2020 |
Nikita Popov |
Add zend_call_known_function() API family This adds the following APIs: void zend_call_known_function( zend_function *fn, zend_object *object, zend_class_entry *called_scope
Add zend_call_known_function() API family This adds the following APIs: void zend_call_known_function( zend_function *fn, zend_object *object, zend_class_entry *called_scope, zval *retval_ptr, int param_count, zval *params); void zend_call_known_instance_method( zend_function *fn, zend_object *object, zval *retval_ptr, int param_count, zval *params); void zend_call_known_instance_method_with_0_params( zend_function *fn, zend_object *object, zval *retval_ptr); void zend_call_known_instance_method_with_1_params( zend_function *fn, zend_object *object, zval *retval_ptr, zval *param); void zend_call_known_instance_method_with_2_params( zend_function *fn, zend_object *object, zval *retval_ptr, zval *param1, zval *param2); These are used to perform a call if you already have the zend_function you want to call. zend_call_known_function() is the base API, the rest are just really thin wrappers around it for the common case of instance method calls. Closes GH-5692.
show more ...
|
#
bfc56ed5 |
| 25-May-2020 |
Dmitry Stogov |
Keep trace number in EG(jit_trace_num) instead of EG(reserved)[zend_func_info_rid]
|
#
8819d247 |
| 20-May-2020 |
Nikita Popov |
Don't require rc=1 for function static variables If file cache only is used, then static_variables_ptr may point to an immutable static_variables HT, which we do not want to destroy
Don't require rc=1 for function static variables If file cache only is used, then static_variables_ptr may point to an immutable static_variables HT, which we do not want to destroy here.
show more ...
|
#
93640db4 |
| 24-Apr-2020 |
Máté Kocsis |
Improve error message for deprecated methods
|
#
555489dd |
| 06-May-2020 |
Alex Dowad |
Honor script time limit when calling shutdown functions A time limit can be set on PHP script execution via `set_time_limit` (or .ini file). When the time limit is reached, the OS will n
Honor script time limit when calling shutdown functions A time limit can be set on PHP script execution via `set_time_limit` (or .ini file). When the time limit is reached, the OS will notify PHP and `timed_out` and `vm_interrupt` flags are set. While these flags are regularly checked when executing PHP code, once the end of the script is reached, they are not checked while invoking shutdown functions (registered via `register_shutdown_function`). Of course, if the shutdown functions are implemented *in* PHP, then the interrupt flag will be checked while the VM is running PHP bytecode and the timeout will take effect. But if the shutdown functions are built-in (implemented in C), it will not. Since the shutdown functions are invoked through `zend_call_function`, add a check of the `vm_interrupt` flag there. Then, the script time limit will be respected when *entering* each shutdown function. The fact still remains that if a shutdown function is built-in and runs for a long time, script execution will not time out until it finishes and the interpreter tries to invoke the next one. Still, the behavior of scripts with execution time limits will be more consistent after this patch. To make the execution time-out feature work even more precisely, it would be necessary to scrutinize all the built-in functions and add checks of the `vm_interrupt` flag in any which can run for a long time. That might not be worth the effort, though. It should be mentioned that this patch does not solely affect shutdown functions, neither does it solely allow for interruption of running code due to script execution timeout. Anything else which causes `vm_interrupt` to be set, such as the PHP interpreter receiving a signal, will take effect when exiting from an internal function. And not just internal functions which are called because they were registered to run at shutdown; there are other cases where a series of internal functions might run in the midst of a script. In all such cases, it will be possible to interrupt the interpreter now. Closes GH-5543.
show more ...
|