mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0: Fix #81380 observer may not be initialized properly
This commit is contained in:
commit
b94b97f7d6
2 changed files with 11 additions and 4 deletions
1
NEWS
1
NEWS
|
@ -5,6 +5,7 @@ PHP NEWS
|
|||
- Core:
|
||||
. Fixed bug #75941 (Fix compile failure on Solaris with clang). (Jaromír
|
||||
Doleček)
|
||||
. Fixed bug #81380 (Observer may not be initialized properly). (krakjoe)
|
||||
|
||||
30 Sep 2021, PHP 8.1.0RC3
|
||||
|
||||
|
|
|
@ -44,11 +44,11 @@ zend_llist zend_observer_fiber_init;
|
|||
zend_llist zend_observer_fiber_switch;
|
||||
zend_llist zend_observer_fiber_destroy;
|
||||
|
||||
int zend_observer_fcall_op_array_extension = -1;
|
||||
int zend_observer_fcall_op_array_extension;
|
||||
|
||||
ZEND_TLS zend_arena *fcall_handlers_arena = NULL;
|
||||
ZEND_TLS zend_execute_data *first_observed_frame = NULL;
|
||||
ZEND_TLS zend_execute_data *current_observed_frame = NULL;
|
||||
ZEND_TLS zend_arena *fcall_handlers_arena;
|
||||
ZEND_TLS zend_execute_data *first_observed_frame;
|
||||
ZEND_TLS zend_execute_data *current_observed_frame;
|
||||
|
||||
// Call during minit/startup ONLY
|
||||
ZEND_API void zend_observer_fcall_register(zend_observer_fcall_init init) {
|
||||
|
@ -78,12 +78,18 @@ ZEND_API void zend_observer_startup(void) {
|
|||
zend_llist_init(&zend_observer_fiber_init, sizeof(zend_observer_fiber_init_handler), NULL, 1);
|
||||
zend_llist_init(&zend_observer_fiber_switch, sizeof(zend_observer_fiber_switch_handler), NULL, 1);
|
||||
zend_llist_init(&zend_observer_fiber_destroy, sizeof(zend_observer_fiber_destroy_handler), NULL, 1);
|
||||
|
||||
zend_observer_fcall_op_array_extension = -1;
|
||||
}
|
||||
|
||||
ZEND_API void zend_observer_activate(void) {
|
||||
if (ZEND_OBSERVER_ENABLED) {
|
||||
fcall_handlers_arena = zend_arena_create(4096);
|
||||
} else {
|
||||
fcall_handlers_arena = NULL;
|
||||
}
|
||||
first_observed_frame = NULL;
|
||||
current_observed_frame = NULL;
|
||||
}
|
||||
|
||||
ZEND_API void zend_observer_deactivate(void) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue