diff options
author | Zeev Suraski <zeev@php.net> | 1999-05-22 16:48:23 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 1999-05-22 16:48:23 +0000 |
commit | 05f6cf54f0d30df63a137ee667bd06cce2c6a158 (patch) | |
tree | 1d03780c667e7d02abf260e5737d6be69822fca6 /Zend/zend_alloc.c | |
parent | 7b58930456e093391833e5bd736666fa01ff7d3a (diff) | |
download | php-git-05f6cf54f0d30df63a137ee667bd06cce2c6a158.tar.gz |
Warn about AiCount not zeroing out
Diffstat (limited to 'Zend/zend_alloc.c')
-rw-r--r-- | Zend/zend_alloc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 917f4949a3..e82948acf6 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -344,6 +344,7 @@ ZEND_API void shutdown_memory_manager(int silent, int clean_cache) char *last_filename = NULL; uint last_lineno = 0; uint leak_count=0, total_bytes=0; + unsigned char had_leaks=0; #endif ALS_FETCH(); @@ -353,6 +354,7 @@ ZEND_API void shutdown_memory_manager(int silent, int clean_cache) if (!t->cached || clean_cache) { #if ZEND_DEBUG if (!t->cached) { + had_leaks = 1; if (last_filename != t->filename || last_lineno!=t->lineno) { /* flush old leak */ if (leak_count>0) { @@ -384,6 +386,13 @@ ZEND_API void shutdown_memory_manager(int silent, int clean_cache) if (!silent && leak_count>1) { zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void *) (leak_count-1)); } + if (had_leaks) { + ELS_FETCH(); + + if (EG(AiCount)!=0) { + fprintf(stderr, "AiCount did not zero out: %d\n", EG(AiCount)); + } + } #endif } |