com php-src: Merge branch 'pr/647': Zend/zend_vm_def.h Zend/zend_vm_execute.h ext/date/tests/bug6711 8.phpt

From: Date: Sun, 05 Oct 2014 21:52:43 +0000
Subject: com php-src: Merge branch 'pr/647': Zend/zend_vm_def.h Zend/zend_vm_execute.h ext/date/tests/bug6711 8.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-82122@lists.php.net to get a copy of this message
Commit: 82523c075214230298c65c33080b568439e6c4c7 Author: Tjerk Meesters <datibbaw@php.net> Mon, 6 Oct 2014 05:52:43 +0800 Parents: 58f389772f19ef604ad151407c7f878fadea6c5f 5c6ca24dc08cd432c17acde0d6b56044fa9e30c9 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=82523c075214230298c65c33080b568439e6c4c7 Log: Merge branch 'pr/647' * pr/647: (33 commits) zend_uint -> uint32_t Fix nesting for *non*-compile-time-resolveable functions See https://github.com/thekid/php-src/commit/a1a4ba95117cca77b6a669d01b1cf97ea4fcb507#commitcomment-7414223 Add tests for calls to nested, *non*-compile-time-resolveable functions See https://github.com/thekid/php-src/commit/a1a4ba95117cca77b6a669d01b1cf97ea4fcb507#commitcomment-7414362 Make list of opcodes used for nesting calculation consistent with zend_do_convert_call_user_func() in Zend/zend_compile.c Rewrite code to use ZEND_VM_JMP() instead of repeated ZEND_VM_INC_OPCODE() calls QA: Simplify code to find matching ZEND_DO_FCALL_BY_NAME CG(context).nested_calls is stored inside the initializer's result.num and inside the finalizer's op2.num, by comparing these we don't need to count manually, and are thus safer from future expansion with specialized opcodes e.g. Fix expected fatal error, now is catchable fatal Adjust expected fatal error message Now also includes "on [TYPE]" after merge from master Check for memory leaks when not using return value Adjust expected fatal error message Now also includes "on [TYPE]" after merge from master Add tests with arrays as parameters Handle ZEND_NEW nesting Also verify nesting with dynamically called static methods Handle ZEND_INIT_NS_FCALL_BY_NAME nesting QA: Refactor: Split tests a bit to make them more comprehendable Support nested static calls Handle ZEND_EXT_FCALL_END, skipping if necessary Verified with running tests with new "-e" run-tests arg: $ make test TESTS=Zend/tests/*-on-non-objects-*phpt TEST_PHP_ARGS=-e # Tests passed : 11 (100.0%) Add support for PHP's 'extended information for debugger/profiler' mode Verify non-CV-operands also work See discussion https://github.com/php/php-src/pull/647#issuecomment-48050551 Only allocate NULL return value if it's actually used ... Conflicts: ext/date/tests/bug67118.phpt Bugs: https://bugs.php.net/67118 Changed paths: MM Zend/zend_vm_def.h MM Zend/zend_vm_execute.h MM ext/date/tests/bug67118.phpt Diff: diff --cc Zend/zend_vm_execute.h index 54d2bb2,1a6d885..d932701 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@@ -27942,9 -27954,11 +28234,11 @@@ static int ZEND_FASTCALL ZEND_INIT_MET zend_error_noreturn(E_ERROR, "Method name must be a string"); } - object = _get_obj_zval_ptr_unused(TSRMLS_C); + object = _get_obj_zval_ptr_unused(execute_data TSRMLS_CC); if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) { + uint32_t nesting = 1; + if (UNEXPECTED(EG(exception) != NULL)) { HANDLE_EXCEPTION(); @@@ -29305,9 -29353,11 +29633,11 @@@ static int ZEND_FASTCALL ZEND_INIT_MET zend_error_noreturn(E_ERROR, "Method name must be a string"); } - object = _get_obj_zval_ptr_unused(TSRMLS_C); + object = _get_obj_zval_ptr_unused(execute_data TSRMLS_CC); if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) { + uint32_t nesting = 1; + if (UNEXPECTED(EG(exception) != NULL)) { zval_ptr_dtor_nogc(free_op2..var); HANDLE_EXCEPTION(); @@@ -30575,9 -30659,11 +30939,11 @@@ static int ZEND_FASTCALL ZEND_INIT_MET zend_error_noreturn(E_ERROR, "Method name must be a string"); } - object = _get_obj_zval_ptr_unused(TSRMLS_C); + object = _get_obj_zval_ptr_unused(execute_data TSRMLS_CC); if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) { + uint32_t nesting = 1; + if (UNEXPECTED(EG(exception) != NULL)) { zval_ptr_dtor_nogc(free_op2.var); HANDLE_EXCEPTION(); @@@ -32355,9 -32475,11 +32755,11 @@@ static int ZEND_FASTCALL ZEND_INIT_MET zend_error_noreturn(E_ERROR, "Method name must be a string"); } - object = _get_obj_zval_ptr_unused(TSRMLS_C); + object = _get_obj_zval_ptr_unused(execute_data TSRMLS_CC); if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) { + uint32_t nesting = 1; + if (UNEXPECTED(EG(exception) != NULL)) { HANDLE_EXCEPTION(); diff --cc ext/date/tests/bug67118.phpt index 7b5d6a7,9061791..4884d77 --- a/ext/date/tests/bug67118.phpt +++ b/ext/date/tests/bug67118.phpt @@@ -23,6 -23,4 +23,7 @@@ class mydt extends datetim new mydt("Funktionsansvarig rådgivning och juridik", "UTC"); ?> --EXPECTF-- -Catchable fatal error: Call to a member function format() on null in %sbug67118.php on line %d + +Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in %s on line %d +Bad date ++

« previous php.cvs (#82122) next »