mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Fixed bug #45352 (Segmentation fault because of tick function on second request)
This commit is contained in:
@@ -1472,6 +1472,8 @@ void php_request_shutdown(void *dummy)
|
||||
EG(opline_ptr) = NULL;
|
||||
EG(active_op_array) = NULL;
|
||||
|
||||
php_deactivate_ticks(TSRMLS_C);
|
||||
|
||||
/* 1. Call all possible shutdown functions registered with register_shutdown_function() */
|
||||
if (PG(modules_activated)) zend_try {
|
||||
php_call_shutdown_functions(TSRMLS_C);
|
||||
|
||||
@@ -27,6 +27,11 @@ int php_startup_ticks(TSRMLS_D)
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
void php_deactivate_ticks(TSRMLS_D)
|
||||
{
|
||||
zend_llist_clean(&PG(tick_functions));
|
||||
}
|
||||
|
||||
void php_shutdown_ticks(TSRMLS_D)
|
||||
{
|
||||
zend_llist_destroy(&PG(tick_functions));
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#define PHP_TICKS_H
|
||||
|
||||
int php_startup_ticks(TSRMLS_D);
|
||||
void php_deactivate_ticks(TSRMLS_D);
|
||||
void php_shutdown_ticks(TSRMLS_D);
|
||||
void php_run_ticks(int count);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user