summaryrefslogtreecommitdiff
path: root/Zend/zend_alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_alloc.c')
-rw-r--r--Zend/zend_alloc.c9
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
}