dmitry          Wed Jun 25 12:18:51 2008 UTC

  Modified files:              
    /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.770&r2=1.771&diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.770 php-src/main/main.c:1.771
--- php-src/main/main.c:1.770   Wed Mar 26 14:46:17 2008
+++ php-src/main/main.c Wed Jun 25 12:18:51 2008
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: main.c,v 1.770 2008/03/26 14:46:17 scottmac Exp $ */
+/* $Id: main.c,v 1.771 2008/06/25 12:18:51 dmitry Exp $ */
 
 /* {{{ includes
  */
@@ -1577,6 +1577,8 @@
        EG(opline_ptr) = NULL;
        EG(active_op_array) = NULL;
 
+       php_deactivate_ticks(TSRMLS_C);
+
        /* 1. Call all possible __destruct() functions */
        zend_try {
                zend_call_destructors(TSRMLS_C);
http://cvs.php.net/viewvc.cgi/php-src/main/php_ticks.c?r1=1.23&r2=1.24&diff_format=u
Index: php-src/main/php_ticks.c
diff -u php-src/main/php_ticks.c:1.23 php-src/main/php_ticks.c:1.24
--- php-src/main/php_ticks.c:1.23       Mon Dec 31 07:12:18 2007
+++ php-src/main/php_ticks.c    Wed Jun 25 12:18:51 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_ticks.c,v 1.23 2007/12/31 07:12:18 sebastian Exp $ */
+/* $Id: php_ticks.c,v 1.24 2008/06/25 12:18:51 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.17&r2=1.18&diff_format=u
Index: php-src/main/php_ticks.h
diff -u php-src/main/php_ticks.h:1.17 php-src/main/php_ticks.h:1.18
--- php-src/main/php_ticks.h:1.17       Mon Dec 31 07:12:18 2007
+++ php-src/main/php_ticks.h    Wed Jun 25 12:18:51 2008
@@ -16,12 +16,13 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_ticks.h,v 1.17 2007/12/31 07:12:18 sebastian Exp $ */
+/* $Id: php_ticks.h,v 1.18 2008/06/25 12:18:51 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

Reply via email to