Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute_API.c
| From: | Antony Dovgal | Date: | Mon, 19 Jul 2004 07:41:24 +0000 |
| Subject: | Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute_API.c | ||
| References: | 1 2 3 | Groups: | php.zend-engine.cvs |
| Request: | Send a blank email to php-zend-engine-cvs+get-2764@lists.php.net to get a copy of this message | ||
On Sun, 18 Jul 2004 18:51:20 +0100
Wez Furlong <wez@thebrainroom.com> wrote:
> Build a debug build and make install; the memory tracker reports
> several
> "free 0 bytes" messages.
> There is another one for the (controversial) do_alloca->emalloc change
>
> to, but I didn't want to get into that one....
Wez, it seems, that there is the same problem in zend_execute.c. See the
diff:
Index: zend_execute.c
===================================================================
RCS file: /repository/ZendEngine2/zend_execute.c,v
retrieving revision 1.654
diff -u -r1.654 zend_execute.c
--- zend_execute.c 19 Jul 2004 07:19:01 -0000 1.654
+++ zend_execute.c 19 Jul 2004 07:36:01 -0000
@@ -1330,7 +1330,9 @@
}
#define RETURN_FROM_EXECUTE_LOOP(execute_data)
\- efree(EX(Ts));
\+ if (EX(Ts)) {
\+
efree(EX(Ts));
\+ }
\ EG(in_execution) = EX(original_in_execution);
\
EG(current_execute_data) = EX(prev_execute_data);
\ return 1; /* CHECK_ME */
@@ -1349,7 +1351,10 @@
/* Initialize execute_data */
EX(fbc) = NULL;
EX(object) = NULL;
- EX(Ts) = (temp_variable *) safe_emalloc(sizeof(temp_variable),
op_array->T, 0);+ EX(Ts) = NULL;
+ if (op_array->T) {
+ EX(Ts) = (temp_variable *)
safe_emalloc(sizeof(temp_variable), op_array->T, 0);+ }
EX(op_array) = op_array;
EX(original_in_execution) = EG(in_execution);
EX(prev_execute_data) = EG(current_execute_data);
Here you can find valgrind's output:
http://lists.php.net/php.internals/11162
---
WBR,
Antony Dovgal aka tony2001
tony2001@phpclub.net || antony@dovgal.com