From 6f15da050e9680025f6e3f4374efaa3e5dccb9c5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Johannes=20Schl=C3=BCter?= Date: Thu, 17 Mar 2011 07:46:57 +0000 Subject: [PATCH] - Revert r309308 temporarily to get 5.3.6 out --- NEWS | 2 -- Zend/tests/bug54265.phpt | 17 ----------------- Zend/zend_execute.c | 16 ++-------------- 3 files changed, 2 insertions(+), 33 deletions(-) delete mode 100644 Zend/tests/bug54265.phpt diff --git a/NEWS b/NEWS index 543e3ab358..0d851b8b63 100644 --- a/NEWS +++ b/NEWS @@ -4,8 +4,6 @@ - Zend Engine: . Fixed bug numerous crashes due to setlocale (crash on error, pcre, mysql etc.) on Windows in thread safe mode. (Pierre) - . Fixed bug #54265 (crash when variable gets reassigned in error handler). - (Dmitry) . Fixed bug #54262 (Crash when assigning value to a dimension in a non-array). (Dmitry) diff --git a/Zend/tests/bug54265.phpt b/Zend/tests/bug54265.phpt deleted file mode 100644 index 43db028a2a..0000000000 --- a/Zend/tests/bug54265.phpt +++ /dev/null @@ -1,17 +0,0 @@ ---TEST-- -Bug #54265 (crash when variable gets reassigned in error handler) ---FILE-- -errormsg = "xyz"); -echo "ok\n"; -?> ---EXPECT-- -EROOR: Creating default object from empty value -ok - diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index f10fce38dc..e270816d8b 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -536,22 +536,10 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, zval (Z_TYPE_P(object) == IS_BOOL && Z_LVAL_P(object) == 0) || (Z_TYPE_P(object) == IS_STRING && Z_STRLEN_P(object) == 0)) { SEPARATE_ZVAL_IF_NOT_REF(object_ptr); + zval_dtor(*object_ptr); + object_init(*object_ptr); object = *object_ptr; - Z_ADDREF_P(object); zend_error(E_STRICT, "Creating default object from empty value"); - if (Z_REFCOUNT_P(object) == 1) { - /* object was removed by error handler, nothing to assign to */ - zval_ptr_dtor(&object); - if (retval) { - *retval = &EG(uninitialized_zval); - PZVAL_LOCK(*retval); - } - FREE_OP(free_value); - return; - } - Z_DELREF_P(object); - zval_dtor(object); - object_init(object); } else { zend_error(E_WARNING, "Attempt to assign property of non-object"); if (!RETURN_VALUE_UNUSED(result)) { -- 2.50.1