mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fixed bug #45352 (Segmentation fault because of tick function on second request)
This commit is contained in:
parent
c5ec48e858
commit
531b31ca08
3 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue