zeev Tue Feb 10 12:55:33 2004 EDT
Modified files:
/php-src/main config.w32.h main.c
Log:
Fix report_memleaks
http://cvs.php.net/diff.php/php-src/main/config.w32.h?r1=1.83&r2=1.84&ty=u
Index: php-src/main/config.w32.h
diff -u php-src/main/config.w32.h:1.83 php-src/main/config.w32.h:1.84
--- php-src/main/config.w32.h:1.83 Tue Dec 9 18:59:33 2003
+++ php-src/main/config.w32.h Tue Feb 10 12:55:32 2004
@@ -2,7 +2,7 @@
Build Configuration for Win32.
This has only been tested with MS VisualC++ 6 (and later).
- $Id: config.w32.h,v 1.83 2003/12/09 23:59:33 sniper Exp $
+ $Id: config.w32.h,v 1.84 2004/02/10 17:55:32 zeev Exp $
*/
/* Default PHP / PEAR directories */
@@ -189,6 +189,7 @@
#define PHP_SHLIB_SUFFIX "dll"
#define HAVE_SQLDATASOURCES
#define POSIX_MALLOC_THRESHOLD 10
+//#define HAVE_SOCKLEN_T 1
/* Win32 supports strcoll */
#define HAVE_STRCOLL 1
http://cvs.php.net/diff.php/php-src/main/main.c?r1=1.589&r2=1.590&ty=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.589 php-src/main/main.c:1.590
--- php-src/main/main.c:1.589 Tue Feb 10 12:44:18 2004
+++ php-src/main/main.c Tue Feb 10 12:55:32 2004
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.589 2004/02/10 17:44:18 zeev Exp $ */
+/* $Id: main.c,v 1.590 2004/02/10 17:55:32 zeev Exp $ */
/* {{{ includes
*/
@@ -952,7 +952,7 @@
break;
case ZMSG_MEMORY_LEAKS_GRAND_TOTAL:
#if ZEND_DEBUG
- if ((EG(error_reporting)&E_WARNING) && PG(report_memleaks)) {
+ if ((EG(error_reporting) & E_WARNING) && PG(report_memleaks)) {
char memory_leak_buf[512];
snprintf(memory_leak_buf, 512, "=== Total %d memory
leaks detected ===\n", *((zend_uint *) data));
@@ -1200,8 +1200,10 @@
*/
void php_request_shutdown(void *dummy)
{
+ zend_bool report_memleaks;
TSRMLS_FETCH();
+ report_memleaks = PG(report_memleaks);
/* EG(opline_ptr) points into nirvana and therefore cannot be safely accessed
* inside zend_executor callback functions.
*/
@@ -1244,8 +1246,8 @@
sapi_deactivate(TSRMLS_C);
} zend_end_try();
- zend_try {
- shutdown_memory_manager(CG(unclean_shutdown), 0 TSRMLS_CC);
+ zend_try {
+ shutdown_memory_manager(CG(unclean_shutdown) || !report_memleaks, 0
TSRMLS_CC);
} zend_end_try();
zend_try {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php