derick                                   Tue, 06 Mar 2012 18:25:55 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=323961

Log:
Add the ZEND_DONT_UNLOAD_MODULES environment variable for debugging to 5.3 as
well.

Changed paths:
    U   php/php-src/branches/PHP_5_3/Zend/README.ZEND_MM
    U   php/php-src/branches/PHP_5_3/Zend/zend_API.c

Modified: php/php-src/branches/PHP_5_3/Zend/README.ZEND_MM
===================================================================
--- php/php-src/branches/PHP_5_3/Zend/README.ZEND_MM    2012-03-06 17:42:59 UTC 
(rev 323960)
+++ php/php-src/branches/PHP_5_3/Zend/README.ZEND_MM    2012-03-06 18:25:55 UTC 
(rev 323961)
@@ -24,6 +24,14 @@

     $ USE_ZEND_ALLOC=0 valgrind --leak-check=full sapi/cli/php -r 'leak();'

+Shared extensions:
+------------------
+
+Since PHP 5.4 it is possible to prevent shared extensions from unloading so
+that valgrind can correctly track the memory leaks in shared extensions. For
+this there is the ZEND_DONT_UNLOAD_MODULES environment variable. If set, then
+DL_UNLOAD() is skipped during the shutdown of shared extensions.
+
 Tweaking:
 ---------


Modified: php/php-src/branches/PHP_5_3/Zend/zend_API.c
===================================================================
--- php/php-src/branches/PHP_5_3/Zend/zend_API.c        2012-03-06 17:42:59 UTC 
(rev 323960)
+++ php/php-src/branches/PHP_5_3/Zend/zend_API.c        2012-03-06 18:25:55 UTC 
(rev 323961)
@@ -2137,7 +2137,7 @@

 #if HAVE_LIBDL
 #if !(defined(NETWARE) && defined(APACHE_1_BUILD))
-       if (module->handle) {
+       if (module->handle && !getenv("ZEND_DONT_UNLOAD_MODULES")) {
                DL_UNLOAD(module->handle);
        }
 #endif

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to