dmitry Thu Jan 19 07:26:58 2006 UTC
Modified files:
/ZendEngine2 zend_execute.c
/ZendEngine2/tests bug36071.phpt
Log:
Fixed bug #36071 (Engine Crash related with 'clone')
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_execute.c?r1=1.731&r2=1.732&diff_format=u
Index: ZendEngine2/zend_execute.c
diff -u ZendEngine2/zend_execute.c:1.731 ZendEngine2/zend_execute.c:1.732
--- ZendEngine2/zend_execute.c:1.731 Tue Jan 17 12:18:52 2006
+++ ZendEngine2/zend_execute.c Thu Jan 19 07:26:57 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute.c,v 1.731 2006/01/17 12:18:52 dmitry Exp $ */
+/* $Id: zend_execute.c,v 1.732 2006/01/19 07:26:57 dmitry Exp $ */
#define ZEND_INTENSIVE_DEBUGGING 0
@@ -569,6 +569,16 @@
zval *value = get_zval_ptr(value_op, Ts, &free_value, BP_VAR_R);
zval **retval = &T(result->u.var).var.ptr;
+ if (*object_ptr == EG(error_zval_ptr)) {
+ FREE_OP(free_op2);
+ if (!RETURN_VALUE_UNUSED(result)) {
+ *retval = EG(uninitialized_zval_ptr);
+ PZVAL_LOCK(*retval);
+ }
+ FREE_OP(free_value);
+ return;
+ }
+
make_real_object(object_ptr TSRMLS_CC); /* this should modify object
only if it's empty */
object = *object_ptr;
http://cvs.php.net/viewcvs.cgi/ZendEngine2/tests/bug36071.phpt?r1=1.1&r2=1.2&diff_format=u
Index: ZendEngine2/tests/bug36071.phpt
diff -u /dev/null ZendEngine2/tests/bug36071.phpt:1.2
--- /dev/null Thu Jan 19 07:26:58 2006
+++ ZendEngine2/tests/bug36071.phpt Thu Jan 19 07:26:58 2006
@@ -0,0 +1,13 @@
+--TEST--
+Bug #36071 (Engine Crash related with 'clone')
+--INI--
+error_reporting=4095
+--FILE--
+<?php
+$a = clone 0;
+$a[0]->b = 0;
+echo "ok\n";
+?>
+--EXPECTF--
+Warning: __clone method called on non-object in %sbug36071.php on line 2
+ok
\ No newline at end of file
--
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
|