Nikita Popov [Sun, 12 Oct 2014 18:39:07 +0000 (20:39 +0200)]
Fix incdec of referenced properties
I thought these SEPARATE_ZVAL_IF_NOT_REF usages were safe at first,
because incdec op supports reference variables. However this
violates the constraint that IS_TMP_VAR variables may not be
references (which is an issue if you use the result of the incdec
op).
Still need to fix the cases where read_property/write_property is
used.
Tjerk Meesters [Sun, 12 Oct 2014 04:55:24 +0000 (12:55 +0800)]
Merge branch 'PHP-5.6'
* PHP-5.6:
More fixes for nodelist array access
- testing for null property read
- no zval copying if the type is already long
- memory fix for master
- use zend_long for offset
Dmitry Stogov [Fri, 10 Oct 2014 12:36:12 +0000 (16:36 +0400)]
Improved specialisation $this variable accessed through IS_UNUSED operand must be IS_OBJECT, so we don't have to check for its type or perform dereference.
Nikita Popov [Thu, 9 Oct 2014 17:15:07 +0000 (19:15 +0200)]
Update get_class_name semantics
* get_class_name is now only used for displaying the class name
in debugging functions like var_dump, print_r, etc. It is no
longer used in get_class() etc.
* As it is no longer used in get_parent_class() the parent
argument is now gone. This also fixes incorrect parent classes
being reported in COM.
* get_class_name is now always required (previously some places
made it optional and some required it) and is also required
to return a non-NULL value.
* Remove zend_get_object_classname. This also fixes a number of
potential leaks due to incorrect usage of this function.
Keyur Govande [Tue, 7 Oct 2014 21:17:36 +0000 (21:17 +0000)]
Fix for bug #68087 (ODBC not reading DATE columns correctly)
Temporary variable indicating column field type ID should be
reset to default for loop iteration (i.e. every column in the
record set. The old buggy code made it persist across all columns
leading to invalid reads from the buffer, if for example a DATE
column was preceded by a VARCHAR column.
Keyur Govande [Tue, 7 Oct 2014 20:58:43 +0000 (20:58 +0000)]
Fix for bug #68114 (Build fails on OS X due to undefined symbols)
gcc (i686-apple-darwin10-gcc-4.2.1) on OS X cannot link fixed-width
decimals and fails with undefined symbols errors like ___extendsddf.
If configure used gcc for compiling it would notice and mark the
feature HAVE_DECIMAL_FP_SUPPORT as unsupported.
But configure seems to use cc (i686-apple-darwin10-llvm-gcc-4.2)
instead, which doesn't support fixed-width decimals either, but the
code compiles and links just fine. I suspect it may have something
to do with the llvm backend printed in the version.
Lacking the time to debug this further, the patch fixes the issue by
checking the expected output when fixed-width decimal support is
present and correctly implemented.
Anatol Belski [Mon, 6 Oct 2014 13:44:43 +0000 (15:44 +0200)]
fix the empty_strings SAPI shutdown leak in TS build
still the NTS variant is somewhat different as it needs
zend_new_interned_string_int because the normal callbacks might
be not initialized, but at least no leaks anymore and some more
structure
Tjerk Meesters [Sun, 5 Oct 2014 21:52:43 +0000 (05:52 +0800)]
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
...