History log of /PHP-8.0/Zend/zend_execute_API.c (Results 26 – 50 of 936)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 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 ...


# f0960879 06-May-2020 Alex Dowad

zend_timeout is not a signal handler function

The 'int dummy' parameter to this function makes it appear that it was intended as a
signal handler, but it is not being used as such. So re

zend_timeout is not a signal handler function

The 'int dummy' parameter to this function makes it appear that it was intended as a
signal handler, but it is not being used as such. So remove the redundant parameter.

show more ...


# 5d93eab6 11-May-2020 Nikita Popov

Don't reset SIGG(running) when calling zend_on_timeout

This is only an internal callback nowadays and does not actually
run any user code. It must be async signal safe.


# 718e55c3 06-May-2020 Nikita Popov

Add zend_array_release() function

To complement zend_string_release() and zend_object_release().


# 48a34bc1 24-Apr-2020 Nikita Popov

Add helper APIs for get_gc implementations

get_gc() implementations that need to explore heterogeneous data
currently work by computing how many GC entries they need,
allocating a bu

Add helper APIs for get_gc implementations

get_gc() implementations that need to explore heterogeneous data
currently work by computing how many GC entries they need,
allocating a buffer for that and storing it on the object. This
is inefficient and wastes memory, because the buffer is retained
after the GC run.

This commit adds an API for a single global GC buffer, which can
be reused by get_gc implementations (as only one get_gc call is
ever active at the same time). The GC buffer will automatically
grow during the GC run and be discarded at the end.

show more ...


# 446724bc 12-Apr-2020 George Peter Banyard

Fix [-Werror=missing-braces] compiler warning

Partial fix to bug 79431


Revision tags: php-7.4.4RC1, php-7.3.16RC1
# 960318ed 25-Feb-2020 Máté Kocsis

Change argument error message format

Closes GH-5211


Revision tags: php-7.4.3, php-7.2.28, php-7.3.15RC1, php-7.4.3RC1
# ac0853eb 29-Jan-2020 Máté Kocsis

Make type error messages more consistent

Closes GH-5092


# 98deece6 30-Jan-2020 Nikita Popov

Reset trampoline on executor startup

Make sure the trampoline is usable, even if we had an unclean
shutdown on the last request.


Revision tags: php-7.3.15, php-7.2.27, php-7.4.2, php-7.3.14
# 0a2f6c55 10-Jan-2020 Nikita Popov

Move undefined constant error into get_constant_ex

All the other error conditions are already handled in there, so
this one should be as well.


Revision tags: php-7.3.14RC1, php-7.4.2RC1, php-7.4.1, php-7.2.26, php-7.3.13
# 621598ea 13-Dec-2019 Nikita Popov

Fixed bug #78921

By resetting fake_scope during autoloading. We already do the same
when executing destructors.


Revision tags: php-7.4.1RC1, php-7.3.13RC1, php-7.2.26RC1, php-7.4.0, php-7.2.25, php-7.3.12, php-7.4.0RC6, php-7.3.12RC1, php-7.2.25RC1, php-7.4.0RC5, php-7.1.33, php-7.2.24, php-7.3.11
# ed31e041 21-Oct-2019 Nikita Popov

Fix leak with cycle in static prop of internal class

More the cleanup of interned classes before the final GC run,
just like it is done for user classes.


Revision tags: php-7.4.0RC4, php-7.3.11RC1, php-7.2.24RC1
# f2e88512 01-Oct-2019 Nikita Popov

Remove func copy optimization for private method with static vars

Not NULLing the static_variables pointer for shadow methods during
static var shutdown would be a way to avoid this leak

Remove func copy optimization for private method with static vars

Not NULLing the static_variables pointer for shadow methods during
static var shutdown would be a way to avoid this leak, but unless
there's evidence that inherited private methods with static vars are
actually a common use-case, I don't think we should keep this kind
of fragile edge-case optimization.

Fixes OSS-Fuzz #17875.

show more ...


Revision tags: php-7.4.0RC3, php-7.2.23, php-7.3.10, php-7.4.0RC2
# 4b9ebd83 11-Sep-2019 Nikita Popov

Allow throwing exception while loading parent class

This is a fix for symfony/symfony#32995.

The behavior is:

* Throwing exception when loading parent/interface is allowed

Allow throwing exception while loading parent class

This is a fix for symfony/symfony#32995.

The behavior is:

* Throwing exception when loading parent/interface is allowed
(and we will also throw one if the class is simply not found).
* If this happens, the bucket key for the class is reset, so
it's possibly to try registering the same class again.
* However, if the class has already been used due to a variance
obligation, the exception is upgraded to a fatal error, as we
cannot safely unregister the class stub anymore.

show more ...


# 270e5e3c 11-Sep-2019 Nikita Popov

Only allow "nearly linked" classes for parent/interface

The requirements for parent/interface are difference than for the
variance checks in type declarations. The latter can work on ful

Only allow "nearly linked" classes for parent/interface

The requirements for parent/interface are difference than for the
variance checks in type declarations. The latter can work on fully
unlinked classes, but the former need inheritance to be essentially
finished, only variance checks may still be outstanding.

Adding a new flag for this because we have lots of space, but we
could also represent these "inheritance states" more compactly in
the future.

show more ...


Revision tags: php-7.2.23RC1, php-7.3.10RC1, php-7.4.0RC1
# f912445e 28-Aug-2019 Nikita Popov

Add missed mutability check


# 2709d6a2 28-Aug-2019 Nikita Popov

Destroy error handlers before final GC run


# ec9a96dc 28-Aug-2019 Nikita Popov

Fixed bug #78335

Destroy static properties and variables prior to the final GC run,
as they may hold GC roots.


Revision tags: php-7.1.32, php-7.2.22, php-7.3.9, php-7.4.0beta4, php-7.2.22RC1, php-7.3.9RC1
# a18ad194 12-Aug-2019 Nikita Popov

Fixed bug #78396


Revision tags: php-7.4.0beta2, php-7.1.31, php-7.2.21, php-7.3.8, php-7.4.0beta1, php-7.2.21RC1, php-7.3.8RC1
# 22ed3628 09-Jul-2019 Nikita Popov

Revert "Fixed bug #76980"

This reverts commit 35353dc49a73a58c17c7896c4c4c3997ef2c007d.

This changes causes issues for Symfony, see
https://github.com/symfony/symfony/issues/323

Revert "Fixed bug #76980"

This reverts commit 35353dc49a73a58c17c7896c4c4c3997ef2c007d.

This changes causes issues for Symfony, see
https://github.com/symfony/symfony/issues/32395. I'm reverting it
from PHP 7.2 and PHP 7.3 and only leaving it in PHP 7.4.

show more ...


12345678910>>...38