Commit Graph

8328 Commits

Author SHA1 Message Date
Dmitry Stogov
5f861768d6 Fixed reference conversion 2014-03-13 22:07:14 +04:00
Dmitry Stogov
bfdaf6e806 Fixed reference support 2014-03-13 17:59:50 +04:00
Dmitry Stogov
25d55d16fc Fixed foreach (now we store HashPointer in additional IS_TMP_VAR slot(s)) 2014-03-13 17:01:28 +04:00
Dmitry Stogov
918866da5f Fixed autoconversion from reference to ordinal value 2014-03-13 14:24:08 +04:00
Dmitry Stogov
e0dd8a4f4b Fixed IS_INDIRECT handling when assign array element by reference.
This might cause passing invalid pointer if the array could be resized before IS_INDIRECT usage.
Now we use IS_REFERENCE instead of IS_INDIRECT.
The following test crashed before:
<?php $a = array(0,1,2,3,4,5,6,7); $a[8] = &$a[7]; ?>
2014-03-13 00:30:53 +04:00
Dmitry Stogov
72f738c368 Fixed reference afto conversion 2014-03-12 12:07:03 +04:00
Dmitry Stogov
d708d3c596 Fixed passing arguments by reference from internal functions 2014-03-11 22:33:28 +04:00
Dmitry Stogov
8863df3653 Fixed reference handling 2014-03-11 14:49:25 +04:00
Dmitry Stogov
4b5e67638e Reverted wrong fix 2014-03-11 11:34:23 +04:00
Xinchen Hui
53e312c663 Review ended
Revert "An demo(for review) to show how to fix the problem(symbol table resize)"

This reverts commit 60c354510b.
2014-03-11 14:23:14 +08:00
Xinchen Hui
60c354510b An demo(for review) to show how to fix the problem(symbol table resize) 2014-03-10 16:25:05 +08:00
Xinchen Hui
80625f20e5 Revert "An demo(for review) to show how to fix the problem we meet"
This reverts commit 4aeae15706.
2014-03-10 16:24:35 +08:00
Xinchen Hui
4aeae15706 An demo(for review) to show how to fix the problem we meet 2014-03-10 11:29:28 +08:00
Xinchen Hui
6c557d867c Fixed ref hanlding in ADD_ARRAY_ELEMENT (by ext/standard/tests/array/bug30074.phpt) 2014-03-09 19:45:45 +08:00
Xinchen Hui
4b40e40ad0 Fixed memleak while sending IS_REFERENCE 2014-03-09 11:48:09 +08:00
Xinchen Hui
f1ed4f6bf9 Fixed parse_ini_file 2014-03-09 11:35:20 +08:00
Dmitry Stogov
7cd78822ab Fixed assignment to reference 2014-03-08 00:02:12 +04:00
Dmitry Stogov
e9855b1992 Fixed pass by reference special cases 2014-03-07 16:45:32 +04:00
Dmitry Stogov
6d67dd3103 Fixed refcounting 2014-03-07 15:58:09 +04:00
Xinchen Hui
3da247e7a8 Forgot to remove unused codes 2014-03-07 17:41:02 +08:00
Xinchen Hui
4b3e6fc129 Refactor reference handling 2014-03-07 17:08:14 +08:00
Dmitry Stogov
03c7ab5a95 Fixed return by reference 2014-03-07 12:25:55 +04:00
Dmitry Stogov
81531116c1 Fixed support for references 2014-03-07 11:32:07 +04:00
Xinchen Hui
7003e76512 Fixed numeric string handling length 2014-03-07 14:35:14 +08:00
Xinchen Hui
ecc0687398 Fixed IS_REFERENCE handling in sort() 2014-03-07 13:51:39 +08:00
Xinchen Hui
f3a6c30cca IS_REFERENCE is unfrequent 2014-03-07 13:51:04 +08:00
Dmitry Stogov
5343cd3216 Fixed guard support in magic method __set() 2014-03-07 02:03:25 +04:00
Dmitry Stogov
85a5712955 Fixed __FILE__ and __METHOD__ constants 2014-03-07 01:34:03 +04:00
Dmitry Stogov
6b303a6bd6 Fixed refcounting 2014-03-07 01:33:33 +04:00
Dmitry Stogov
b146ed1607 Fixed dynamic properties cloning 2014-03-07 00:50:02 +04:00
Dmitry Stogov
70260d133e Fixed memory leak 2014-03-07 00:26:21 +04:00
Dmitry Stogov
9ed631a4d0 Fixed ArrayAccess behavior 2014-03-06 17:59:17 +04:00
Dmitry Stogov
3e4c22b499 Fixed possible HashTable modification in its destructor 2014-03-06 16:53:13 +04:00
Dmitry Stogov
60eac8b860 Fixed string offset handling 2014-03-06 16:00:38 +04:00
Xinchen Hui
9eb9ba3aa8 Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2
Conflicts:
	ext/standard/formatted_print.c
2014-03-06 19:03:22 +08:00
Dmitry Stogov
0b6af57256 Fixed memory leaks 2014-03-06 14:29:36 +04:00
Xinchen Hui
b212461297 IS_REFERENCE is unfrequent 2014-03-06 18:23:16 +08:00
Xinchen Hui
6ee7240119 Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2 2014-03-06 18:07:42 +08:00
Dmitry Stogov
076da5a372 Fixed IS_REFERENCE support 2014-03-06 13:59:15 +04:00
Xinchen Hui
66dead5239 Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2 2014-03-06 17:39:00 +08:00
Xinchen Hui
089820e102 Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2 2014-03-06 17:33:22 +08:00
Dmitry Stogov
8d2fb9d479 Internal functions may return (e.g. on wrong arguments) keeping the original return_value. So we have to initialize return_value as IS_NULL. 2014-03-06 13:32:43 +04:00
Dmitry Stogov
9727b47418 Fixed ArrayAccess handling 2014-03-06 13:11:23 +04:00
Xinchen Hui
bc18a22e44 Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2 2014-03-06 16:44:11 +08:00
Dmitry Stogov
2eb980f614 IS_REFERENCE with refcount==1 should be handled as ordinal value 2014-03-06 12:37:46 +04:00
Xinchen Hui
86227d3403 Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2 2014-03-06 14:17:49 +08:00
Dmitry Stogov
f3b4b16883 Fixed passing reference by value in call_user_func() 2014-03-06 01:04:28 +04:00
Dmitry Stogov
9ebd9388ee Fixed Generator::throw() 2014-03-06 00:45:53 +04:00
Dmitry Stogov
018be97c0d Fixed support for undefined constants in RECV_INIT 2014-03-06 00:15:56 +04:00
Dmitry Stogov
712dd6c68e Fixed "foreach ($reference as $val)" 2014-03-05 23:22:50 +04:00
Xinchen Hui
9a4e16db6f Fixed zend_is_true to support IS_REFERENCE 2014-03-05 22:31:02 +08:00
Xinchen Hui
84f20dc212 Invalid free of args("+") 2014-03-05 22:19:02 +08:00
Dmitry Stogov
c5af715f2b Fixed hidden property handling 2014-03-05 17:57:21 +04:00
Dmitry Stogov
28aacbfe15 It's not possible to create reference to string-offset 2014-03-05 17:32:23 +04:00
Dmitry Stogov
84c092f6d6 Fixed by reference parameter passing from internal functions 2014-03-05 16:17:00 +04:00
Dmitry Stogov
50d899dda3 Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2 2014-03-05 15:34:50 +04:00
Dmitry Stogov
b763baff97 Temporary fix for lazy symbol table initialization called from zemd_error(), that converts CV variables into IS_INDIRECT 2014-03-05 15:33:31 +04:00
Xinchen Hui
ef01b7937e Fixed wrong hash value in ext/standard/tests/array/array_combine.php 2014-03-05 18:39:20 +08:00
Xinchen Hui
74c2deecd8 Fixed refcounted 2014-03-05 18:11:22 +08:00
Xinchen Hui
581fa5822e Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2
Conflicts:
	ext/standard/array.c
2014-03-05 18:02:35 +08:00
Dmitry Stogov
3733737328 Handle interned strings as non-refcounted scalars 2014-03-05 13:55:56 +04:00
Xinchen Hui
36f01f158c Fixed NULL pointer dereference 2014-03-05 17:29:29 +08:00
Xinchen Hui
dc889b69ef Fixed segfault (op2 maybe equal to result) 2014-03-05 15:43:57 +08:00
Dmitry Stogov
040dea8b82 Arguments taken by internal functions using zend_parse_parameters() with "+" and "*" specifications must not be deallocated anymore. 2014-03-05 11:10:52 +04:00
Dmitry Stogov
19670c2bbc Fixied calling object closures from internal functions 2014-03-05 01:54:21 +04:00
Dmitry Stogov
db7b5325f0 Fixed IS_REFERENCE separation 2014-03-05 00:28:01 +04:00
Dmitry Stogov
6b8c46dc76 Fixed passing by reference 2014-03-04 23:54:05 +04:00
Dmitry Stogov
58918431e9 Fixed test 2014-03-04 23:30:56 +04:00
Dmitry Stogov
8b82b3e735 Fixed return of references by value 2014-03-04 17:38:19 +04:00
Dmitry Stogov
38151a38ec Fixed dereferencing of value returned from function (foo()[1] = ...) 2014-03-04 17:23:23 +04:00
Dmitry Stogov
ba30f1e946 Fixed assign by reference 2014-03-04 17:04:46 +04:00
Dmitry Stogov
dbb6837627 EG(error_zval) must be passed as IS_INDIRECT 2014-03-04 16:32:40 +04:00
Dmitry Stogov
f88816acbb Fixed next index insetion through magic function ($obj[] = ...) 2014-03-04 16:07:42 +04:00
Dmitry Stogov
e0f6bae56b Passing symbol_table into user error handlers 2014-03-04 14:17:17 +04:00
Dmitry Stogov
1be0df935f Fixed destruction of VM handler operands (FREE_OP1 and family) 2014-03-04 12:27:50 +04:00
Xinchen Hui
ca146a6e14 Elements in array could be reference 2014-03-03 17:44:21 +08:00
Xinchen Hui
5de87fe680 Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2 2014-03-03 17:34:01 +08:00
Dmitry Stogov
e73c32c229 Fixed macros 2014-03-03 13:09:56 +04:00
Xinchen Hui
dc96140721 Fixed typo in get_extension_funcs 2014-03-03 17:06:04 +08:00
Xinchen Hui
e1d1be148e Fixed NULL pointer dereference 2014-03-03 16:10:15 +08:00
Dmitry Stogov
46ab80b48e Temporary fix for reference counting 2014-02-28 23:42:32 +04:00
Dmitry Stogov
29d61b6527 Fixed refcounting 2014-02-28 23:25:06 +04:00
Dmitry Stogov
843423716b Fixed user stream filters 2014-02-28 23:05:22 +04:00
Xinchen Hui
0680cdb4ac Fixed refcount handling 2014-02-28 22:47:24 +08:00
Dmitry Stogov
53128644f3 Redesigned SRR_OFFSET handling 2014-02-28 17:39:08 +04:00
Dmitry Stogov
e26722c2fa Fixed access to undefined properties 2014-02-28 16:56:52 +04:00
Dmitry Stogov
cb7797a43c Fixed NULL pointer dereferencing 2014-02-28 16:16:15 +04:00
Dmitry Stogov
08d9a4ffa2 Fixed closures in static methods 2014-02-28 16:06:38 +04:00
Dmitry Stogov
a18a95f70a Fixed support for references 2014-02-28 15:58:11 +04:00
Dmitry Stogov
feeca5aba6 Fixed uninitialized zval 2014-02-28 15:47:37 +04:00
Dmitry Stogov
d0311ad28e Fixed method argument parsing 2014-02-28 15:47:12 +04:00
Dmitry Stogov
04d04d01c8 Fixed memory leak 2014-02-28 14:24:35 +04:00
Dmitry Stogov
a72a1b1391 Fixed memory leak 2014-02-28 13:43:52 +04:00
Dmitry Stogov
9d1294e33d Fixed memory leak 2014-02-28 13:29:18 +04:00
Dmitry Stogov
339d82c72d Fixed __COMPILER_HALT_OFFSET handling 2014-02-28 13:15:40 +04:00
Dmitry Stogov
663990284b Fixed get_defined_functions() 2014-02-28 13:10:07 +04:00
Dmitry Stogov
17a009ddce Fixed isset($str[$double]) 2014-02-28 13:04:46 +04:00
Dmitry Stogov
3ed445f749 Fixed IS_REFERENCE support 2014-02-28 12:54:38 +04:00
Dmitry Stogov
cee824bbef Fixed SEPARATE_ZVAL_IF_REF() 2014-02-28 12:21:12 +04:00
Xinchen Hui
142dd01006 Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2 2014-02-28 15:25:18 +08:00
Dmitry Stogov
5b5367ddbb Fixed SEPARATE_ZVAL() to support objects and resources 2014-02-28 11:21:15 +04:00
Xinchen Hui
1265850fef Add zend_iterator_dtor 2014-02-28 15:03:43 +08:00
Dmitry Stogov
54095e8c56 Converting from reference to regular value 2014-02-28 11:03:05 +04:00
Dmitry Stogov
855a030b7b Fixed return value handling in ZEND_ASSIGN_OBJ 2014-02-28 10:41:28 +04:00
Xinchen Hui
a5ce7d526e Revert "Move zend_objects_store_put out of zend_object_std_init"
This reverts commit 8ced4f0ac9.
2014-02-28 13:59:07 +08:00
Xinchen Hui
3231174749 Fixed typo in previous commit 2014-02-28 13:15:51 +08:00
Xinchen Hui
8ced4f0ac9 Move zend_objects_store_put out of zend_object_std_init 2014-02-28 12:59:51 +08:00
Dmitry Stogov
08da14adac Fixed support for IS_REFERENCE 2014-02-28 00:21:12 +04:00
Dmitry Stogov
6f578b57bc Fixed FETCH_OBJ_UNSET, FETCH_DIM_UNSET 2014-02-28 00:09:43 +04:00
Dmitry Stogov
cb181c512a I don't know how to fix it 2014-02-27 23:51:00 +04:00
Dmitry Stogov
3960b0acc4 Temporarry commented 2014-02-27 23:50:43 +04:00
Dmitry Stogov
10fd93343e Fixed reference counting 2014-02-27 23:25:41 +04:00
Dmitry Stogov
e43d0d1717 fixed refcounting in "$a->magic_prop += 2" 2014-02-27 23:18:37 +04:00
Dmitry Stogov
5e4a97f365 Fixed ASSIGN_OBJ with IS_TMP and IS_CONST operand 2014-02-27 22:53:56 +04:00
Dmitry Stogov
0e44e0611d Fixed ASSIGN of IS_REFERENCE (it should be separated) 2014-02-27 22:16:15 +04:00
Dmitry Stogov
c5a508582f Fixed refcounting 2014-02-27 18:10:42 +04:00
Dmitry Stogov
9d6cce629a Fixed __get() related memleak 2014-02-27 16:58:18 +04:00
Dmitry Stogov
3810b4ab4a Fixed constant expressions in array indeces handling 2014-02-27 16:41:41 +04:00
Dmitry Stogov
3696e038e5 Various fixes related to read_property(), read_dimension() and iterators refactoring 2014-02-27 16:07:36 +04:00
Dmitry Stogov
4ba590697e Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2 2014-02-27 15:40:51 +04:00
Dmitry Stogov
1c3ba95bb5 Refactored read_property() and read_dimension() handlers 2014-02-27 15:40:13 +04:00
Xinchen Hui
382b0dfdb7 Refactoring zend_iterator (incompleted) 2014-02-27 19:19:02 +08:00
Dmitry Stogov
ee3254a2e8 Temporary refcounting fix 2014-02-27 13:06:11 +04:00
Dmitry Stogov
1493b30501 Temporarry refcounting fix 2014-02-27 12:53:40 +04:00
Dmitry Stogov
054917619a Fixed empty() 2014-02-27 12:48:53 +04:00
Dmitry Stogov
0548ac59a5 Resource closing without destruction 2014-02-27 12:28:55 +04:00
Dmitry Stogov
60eadc80b8 Fixed return anf yield by reference 2014-02-26 18:07:16 +04:00
Dmitry Stogov
e49c0804da Temporary memory leak fix (should be done in a better way) 2014-02-26 17:36:39 +04:00
Dmitry Stogov
39c466147a Fixed user iterator creation 2014-02-26 16:28:04 +04:00
Dmitry Stogov
0bde8c9857 Fixed argument unpacking 2014-02-26 16:17:28 +04:00
Dmitry Stogov
6829be6c26 ifixed foreach() by reference 2014-02-26 15:38:58 +04:00
Dmitry Stogov
ff1778a89f Temorary fix for implicit IS_CV conversion into IS_INDIRECTR 2014-02-26 15:17:08 +04:00
Dmitry Stogov
495551aa8c Fixed iterators API. zend_iterator_init() has to be used in each get_iterator() callback. 2014-02-26 15:01:08 +04:00
Dmitry Stogov
d062fb3344 Generator related fixes 2014-02-26 13:58:59 +04:00
Xinchen Hui
66b7f6722d Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2 2014-02-26 12:52:43 +08:00
Xinchen Hui
0c0e9c3cd7 Fixed class name usage 2014-02-26 11:26:08 +08:00
Xinchen Hui
f4a70fa759 Fixed has_propery 2014-02-26 11:18:19 +08:00
Dmitry Stogov
bb27b4ac95 Fixed refcounting 2014-02-26 01:09:58 +04:00
Dmitry Stogov
78fc6b3570 Fixed refcounting 2014-02-26 01:09:34 +04:00
Dmitry Stogov
e4b5848859 Fixed handling of "static" variables 2014-02-25 23:56:09 +04:00
Dmitry Stogov
329a576f39 Fixed EG(error_zval) handling 2014-02-25 23:39:25 +04:00
Dmitry Stogov
f0e9a108a7 Fixed support for references 2014-02-25 23:26:04 +04:00
Dmitry Stogov
4fd84823f6 Fixed foreach() over object properties 2014-02-25 17:56:03 +04:00
Dmitry Stogov
fdd1f74e37 Fixed debug backtrace 2014-02-25 17:11:55 +04:00
Dmitry Stogov
068ea84a84 THIS MAY BE A REAL PROBLEM 2014-02-25 16:38:18 +04:00
Dmitry Stogov
77abd35b78 Fixed memory leak 2014-02-25 16:20:42 +04:00
Dmitry Stogov
639e4e1afa Changes zend_is_callable() to use zend_string* instead of char* 2014-02-25 16:03:34 +04:00
Dmitry Stogov
b965647e44 Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2
Conflicts:
	Zend/zend_object_handlers.c
2014-02-25 15:23:06 +04:00
Xinchen Hui
40a9132de8 zend_hash_add might return NULL in ext/standard/tests/serialize/serialization_objects_011.php 2014-02-25 18:29:20 +08:00
Xinchen Hui
346d52c2c4 Fixed asseration fail 2014-02-25 18:22:54 +08:00