[PHP4BETA] CVS update: php4
| From: | zeev | Date: | Sat, 22 May 1999 10:56:36 +0000 |
| Subject: | [PHP4BETA] CVS update: php4 | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-987@lists.php.net to get a copy of this message | ||
Date: Saturday May 22, 1999 @ 6:56
Author: zeev
Update of /repository/php4
In directory php:/tmp/cvs-serv13061
Modified Files:
cgi_main.c main.c
Log Message:
* Minor fixes
* Better handling for multiple repeated memory leaks (libzend updated)
Index: php4/cgi_main.c
diff -u php4/cgi_main.c:1.15 php4/cgi_main.c:1.16
--- php4/cgi_main.c:1.15 Fri May 21 19:25:46 1999
+++ php4/cgi_main.c Sat May 22 06:56:36 1999
@@ -395,6 +395,7 @@
if (cgi || request_info.filename) {
file_handle.filename = request_info.filename;
file_handle.handle.fp = php3_fopen_for_parser();
+ SG(request_info).path_translated = file_handle.filename;
}
if (cgi && !file_handle.handle.fp) {
Index: php4/main.c
diff -u php4/main.c:1.61 php4/main.c:1.62
--- php4/main.c:1.61 Sat May 22 05:24:19 1999
+++ php4/main.c Sat May 22 06:56:36 1999
@@ -29,7 +29,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.61 1999/05/22 09:24:19 zeev Exp $ */
+/* $Id: main.c,v 1.62 1999/05/22 10:56:36 zeev Exp $ */
#include <stdio.h>
@@ -569,16 +569,25 @@
case ZMSG_FAILED_HIGHLIGHT_FOPEN:
php3_error(E_WARNING, "Failed opening '%s' for highlighting",
php3_strip_url_passwd((char *) data));
break;
- case ZMSG_MEMORY_LEAK_DETECTED: {
+ case ZMSG_MEMORY_LEAK_DETECTED:
+ case ZMSG_MEMORY_LEAK_REPEATED: {
ELS_FETCH();
SLS_FETCH();
if (EG(error_reporting)&E_WARNING) {
#if ZEND_DEBUG
- mem_header *t = (mem_header *) data;
char memory_leak_buf[512];
+ SLS_FETCH();
- snprintf(memory_leak_buf, 512, "Freeing 0x%0.8X (%d bytes), allocated in %s on line
%d<br>\n",(void *)((char
*)t+sizeof(mem_header)+PLATFORM_PADDING),t->size,t->filename,t->lineno);
+ if (message==ZMSG_MEMORY_LEAK_DETECTED) {
+ mem_header *t = (mem_header *) data;
+
+ snprintf(memory_leak_buf, 512, "%s: Freeing 0x%0.8X (%d bytes), allocated in %s on line
%d<br>\n", SG(request_info).path_translated, (void *)((char
*)t+sizeof(mem_header)+PLATFORM_PADDING),t->size,t->filename,t->lineno);
+ } else {
+ uint leak_count = (uint) data;
+
+ snprintf(memory_leak_buf, 512, "%s: Last leak repeated %d time%s\n",
SG(request_info).path_translated, leak_count, (leak_count>1?"s":""));
+ }
# if WIN32||WINNT
OutputDebugString(memory_leak_buf);
# else
@@ -1213,7 +1222,6 @@
#endif
SLS_FETCH();
- fprintf(stderr, "%d request startup\n", getpid());
if (php_request_startup(CLS_C ELS_CC PLS_CC SLS_CC) == FAILURE) {
return FAILURE;
}
@@ -1221,10 +1229,8 @@
file_handle.type = ZEND_HANDLE_FD;
file_handle.handle.fd = fd;
file_handle.filename = SG(request_info).path_translated;
- fprintf(stderr, "%d executing script\n", getpid());
(void) php_execute_script(&file_handle CLS_CC ELS_CC);
- fprintf(stderr, "%d Terminated successfully, sending headers\n", getpid());
php3_header(); /* Make sure headers have been sent */
zend_end_ob_buffering(1);
fprintf(stderr, "%d all done\n", getpid());
--
PHP 4 Beta