dmitry Wed Jun 25 12:18:36 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/main main.c php_ticks.c php_ticks.h Log: Fixed bug #45352 (Segmentation fault because of tick function on second request) http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.23&r2=1.640.2.23.2.57.2.24&diff_format=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.640.2.23.2.57.2.23 php-src/main/main.c:1.640.2.23.2.57.2.24 --- php-src/main/main.c:1.640.2.23.2.57.2.23 Sat Jun 21 02:41:27 2008 +++ php-src/main/main.c Wed Jun 25 12:18:36 2008 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.640.2.23.2.57.2.23 2008/06/21 02:41:27 felipe Exp $ */ +/* $Id: main.c,v 1.640.2.23.2.57.2.24 2008/06/25 12:18:36 dmitry Exp $ */ /* {{{ includes */ @@ -1472,6 +1472,8 @@ 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); http://cvs.php.net/viewvc.cgi/php-src/main/php_ticks.c?r1=1.20.2.1.2.1.2.1&r2=1.20.2.1.2.1.2.2&diff_format=u Index: php-src/main/php_ticks.c diff -u php-src/main/php_ticks.c:1.20.2.1.2.1.2.1 php-src/main/php_ticks.c:1.20.2.1.2.1.2.2 --- php-src/main/php_ticks.c:1.20.2.1.2.1.2.1 Mon Dec 31 07:17:17 2007 +++ php-src/main/php_ticks.c Wed Jun 25 12:18:36 2008 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ticks.c,v 1.20.2.1.2.1.2.1 2007/12/31 07:17:17 sebastian Exp $ */ +/* $Id: php_ticks.c,v 1.20.2.1.2.1.2.2 2008/06/25 12:18:36 dmitry Exp $ */ #include "php.h" #include "php_ticks.h" @@ -27,6 +27,11 @@ 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)); http://cvs.php.net/viewvc.cgi/php-src/main/php_ticks.h?r1=1.14.2.1.2.1.2.1&r2=1.14.2.1.2.1.2.2&diff_format=u Index: php-src/main/php_ticks.h diff -u php-src/main/php_ticks.h:1.14.2.1.2.1.2.1 php-src/main/php_ticks.h:1.14.2.1.2.1.2.2 --- php-src/main/php_ticks.h:1.14.2.1.2.1.2.1 Mon Dec 31 07:17:17 2007 +++ php-src/main/php_ticks.h Wed Jun 25 12:18:36 2008 @@ -16,12 +16,13 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ticks.h,v 1.14.2.1.2.1.2.1 2007/12/31 07:17:17 sebastian Exp $ */ +/* $Id: php_ticks.h,v 1.14.2.1.2.1.2.2 2008/06/25 12:18:36 dmitry Exp $ */ #ifndef PHP_TICKS_H #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);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php