History log of /PHP-8.0/Zend/zend_observer.c (Results 1 – 13 of 13)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# e6cf5831 12-Feb-2022 Bob Weinand

Fix GH-8082: Prevent leaking memory on observed transient run_time_caches

This is achieved by tracking the observers on the run_time_cache (with a fixed amount of slots, 2 for each observer)

Fix GH-8082: Prevent leaking memory on observed transient run_time_caches

This is achieved by tracking the observers on the run_time_cache (with a fixed amount of slots, 2 for each observer).
That way round, if the run_time_cache is freed all associated observer data is as well.

This approach has been chosen, as to avoid any ABI or API breakage.
Future versions may for example choose to provide a hookable API for run_time_cache freeing or similar.

show more ...


# ee610947 27-Dec-2021 Christoph M. Becker

Revert "Fix zend_observer_fcall_end_all() accessing dangling pointers"

This reverts commit 76e2a8380e5e030412e9d565955d011972af8418. Cf.
<https://github.com/php/php-src/commit/76e2a8380

Revert "Fix zend_observer_fcall_end_all() accessing dangling pointers"

This reverts commit 76e2a8380e5e030412e9d565955d011972af8418. Cf.
<https://github.com/php/php-src/commit/76e2a8380e5e030412e9d565955d011972af8418#r62560239>.

show more ...


# 76e2a838 18-Nov-2021 Florian Sowade

Fix zend_observer_fcall_end_all() accessing dangling pointers

This may happen, when the execute_data was allocated on the stack. We
ensure that the runtime cache pointer is not NULL bef

Fix zend_observer_fcall_end_all() accessing dangling pointers

This may happen, when the execute_data was allocated on the stack. We
ensure that the runtime cache pointer is not NULL before dereferencing
it.

This is a partial fix for bug 81430.

Closes GH-7665.

show more ...


# c884a5a2 28-Sep-2021 Joe Watkins

Fix #81380 observer may not be initialized properly


# 12b0f1b7 13-Sep-2021 Bob Weinand

Fix #81435 Observer current_observed_frame may point to an old (overwritten) frame

Ensure current_observed_frame always points to an actually observed frame.
This solution has a caveat o

Fix #81435 Observer current_observed_frame may point to an old (overwritten) frame

Ensure current_observed_frame always points to an actually observed frame.
This solution has a caveat of being O(stack size), with the worst case occurring if there are a lot of frames between the current and previous observed frames.
An O(1) solution would require keeping track of the previous observed frame, which would require some additional frame attached metadata, which is best not attempted in an already released version.

show more ...


# 17142eab 15-Jan-2021 Sammy Kaye Powers

Observe fake closures

Closes GH-6607.


# 094e1a8b 26-Jan-2021 Dmitry Stogov

Skip dummy frames allocated on CPU stack of zend_call_function().
(Usage of "current_observed_frame" varible looks unsafe to me).


Revision tags: php-8.0.0, php-7.3.25, php-7.4.13, php-8.0.0RC5, php-7.4.13RC1, php-8.0.0RC4, php-7.3.25RC1, php-7.4.12, php-8.0.0RC3, php-7.3.24
# 0425a669 23-Oct-2020 Sammy Kaye Powers

Fire open observer end handlers after a zend_bailout

Closes GH-6377


Revision tags: php-8.0.0RC2, php-7.4.12RC1, php-7.3.24RC1, php-7.2.34, php-8.0.0rc1, php-7.4.11, php-7.3.23
# e42abeaf 24-Sep-2020 Sammy Kaye Powers

Pass zend_execute_data instead of zend_function to fcall init

The motivation for this change is to prevent extensions from having to check executor globals for the current execute_data durin

Pass zend_execute_data instead of zend_function to fcall init

The motivation for this change is to prevent extensions from having to check executor globals for the current execute_data during function call init. A previous implementation of the observer API initialized the function call from runtime cache initialization before execute_data was allocated which is why zend_function was passed in.

But now that the observer API is implemented via opcode specialization, it makes sense to pass in the execute_data. This also keeps the API a bit more consistent for existing extensions that already hook zend_execute_ex.

Closes GH-6209

show more ...


Revision tags: php-8.0.0beta4, php-7.4.11RC1, php-7.3.23RC1, php-8.0.0beta3, php-7.4.10, php-7.3.22, php-8.0.0beta2, php-7.3.22RC1, php-7.4.10RC1, php-8.0.0beta1, php-7.4.9, php-7.2.33, php-7.3.21, php-8.0.0alpha3, php-7.4.9RC1, php-7.3.21RC1
# 12306728 16-Jul-2020 Sammy Kaye Powers

Add system ID entropy API

The `zend_system_id` is a (true global) system ID that fingerprints a process state. When extensions add engine hooks during MINIT/startup, entropy is added the sys

Add system ID entropy API

The `zend_system_id` is a (true global) system ID that fingerprints a process state. When extensions add engine hooks during MINIT/startup, entropy is added the system ID for each hook. This allows extensions to identify that changes have been made to the engine since the last PHP process restart.

Closes GH-5871

show more ...


# d5d31ea3 18-Sep-2020 Dmitry Stogov

Cleanup observer API and add JIT support


# 1359a52d 14-Sep-2020 Benjamin Eberlei

Rename zend_error_notify APIs to zend_observer_error*


# 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>