Commit Graph

147 Commits

Author SHA1 Message Date
Nikita Popov
6093c9370b Fix resource leak when casting to string 2015-01-24 23:18:26 +01:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Nikita Popov
1266515e19 Fix uses of zval_add_ref and add comment on usage
zval_add_ref should be used as a copy ctor, after the value was
already copied.

In particular when used with hash insertions, it should be applied
to the return value of the insert function.
2015-01-05 17:02:11 +01:00
Xinchen Hui
faa4171507 Add test script and use efree_size 2015-01-05 22:21:37 +08:00
Xinchen Hui
40230eef81 Revert "Revert "Fix memory leak when dereferencing reference with refcount 1""
This reverts commit 7aab9659ee.
2015-01-05 22:13:22 +08:00
Xinchen Hui
7aab9659ee Revert "Fix memory leak when dereferencing reference with refcount 1"
This reverts commit f4cb5cc09d.

breaks tests Zend/tests/bug27268.phpt and Zend/tests/bug68262.phpt
2015-01-05 00:26:10 -05:00
Bob Weinand
f4cb5cc09d Fix memory leak when dereferencing reference with refcount 1 2015-01-05 00:28:53 +01:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Dmitry Stogov
3727e26456 Improved zend_hash_clean() and added new optimized zend_symtable_clean() 2014-11-25 14:17:21 +03:00
Dmitry Stogov
fb42d9d46e Use inline version of zval_ptr_dtor() 2014-11-25 13:05:35 +03:00
Dmitry Stogov
ab7b38e336 Added new optimized zend_array_destroy() function 2014-11-25 12:58:29 +03:00
Anatol Belski
1b4fd5825a fix datatype mismatch warnings 2014-10-24 20:57:38 +02:00
Dmitry Stogov
0e270661a4 Use ADDREF instead of DUP, it must be enough. 2014-10-20 13:55:55 +04:00
Dmitry Stogov
661f90d4d1 Replaced Zend Memory Manager 2014-08-26 16:21:58 +04:00
Nikita Popov
6db293d5e0 Merge remote-tracking branch 'php-src/master' into ast
Conflicts:
	Zend/zend_compile.c
	Zend/zend_compile.h
	Zend/zend_globals.h
	Zend/zend_language_parser.y
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner.l
	Zend/zend_types.h
2014-08-25 21:52:18 +02:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski
8ee2a4a9b5 first shot on merging the core fro the int64 branch 2014-08-16 11:16:11 +02:00
Nikita Popov
edd9fcab1e Fix leaks
Must find a good way to handle constant expressions...
2014-07-26 18:08:31 +02:00
Xinchen Hui
5fb31215cb Fixed segfault 2014-07-23 11:05:03 +08:00
Dmitry Stogov
f81956cb3e Fixed GC bug 2014-07-22 18:39:58 +04:00
Xinchen Hui
6cc487df2c Revert "stash" (pushed by accident)
This reverts commit a18bf5fc93.
2014-07-18 16:27:31 +08:00
Xinchen Hui
a18bf5fc93 stash 2014-07-16 16:35:48 +08:00
Dmitry Stogov
6bf24f4dd0 Removed EG(active_symbol_table) and use corresponding value from EG(current_execute_data) 2014-07-04 18:03:45 +04:00
Dmitry Stogov
c1965f58d4 Use reference counting instead of zval duplication 2014-06-05 16:04:11 +04:00
Dmitry Stogov
40256e0f9c Use specialized functions instead of macros 2014-05-26 17:16:16 +04:00
Dmitry Stogov
9eb89dddb1 Use optimized zend_array_dup() function. convert zend_hash_num_elements() and zend_hash_next_free_element() into macros. 2014-05-23 20:37:53 +04:00
Dmitry Stogov
fa7008bb24 Fixed resource destruction 2014-05-08 02:48:31 +04:00
Dmitry Stogov
0c6a6f0fba Re-applyed Bob's patch with minor fixes 2014-05-07 15:03:56 +04:00
Dmitry Stogov
4ecc527976 Reverted Bob's patch (it breaks many tests when run with opcache and needs to be fixed first). 2014-05-07 03:26:13 +04:00
Bob Weinand
f3c1881f1d Re-added fix for bug #66015 and adapted for phpng branch 2014-05-06 14:59:03 +02:00
Dmitry Stogov
17d027ed47 Split IS_BOOL into IS_FALSE and IS_TRUE 2014-04-30 18:32:42 +04:00
Nikita Popov
bda96e3c58 Use zval_get_string in print_zval and propagate TSRMLS 2014-04-21 17:55:58 +02:00
Dmitry Stogov
050d7e38ad Cleanup (1-st round) 2014-04-15 15:40:40 +04:00
Dmitry Stogov
5dc52e4880 Fixed interface constants inheritance.
Now we use IS_REFERENCE for inhereted class constants.
I might miss some edje cases.
2014-04-14 13:24:43 +04:00
Dmitry Stogov
76cc99fe60 Refactored ZVAL flags usage to simplify various checks (e.g. Z_REFCOUNTED(), candidate for GC, etc) 2014-04-03 15:26:23 +04:00
Dmitry Stogov
d8099d0468 Changed data layout to allow more efficient operations 2014-04-02 14:34:44 +04:00
Dmitry Stogov
a25a1ba0ef STR_DUP() doesn't duplicate interned strings anymore. In case new string is required STR_INIT() or STR_ALLOC() should be used. 2014-04-01 16:31:03 +04:00
Dmitry Stogov
887189ca31 Refactored IS_INDIRECT usage for CV and object properties to support HashTable resizing 2014-03-26 18:07:31 +04:00
Dmitry Stogov
a4280c340b Fixed reference counting 2014-03-21 21:34:15 +04:00
Dmitry Stogov
36cd92a7d3 Fixed passing argument by refefence from internal functions 2014-03-20 17:03:32 +04:00
Dmitry Stogov
1d66808dc4 Reverted 07fcdc40a0 2014-03-20 11:48:49 +04:00
Dmitry Stogov
07fcdc40a0 Fixed circular array copying 2014-03-20 11:37:42 +04:00
Dmitry Stogov
b7938ab1bd Refactored GC (incomplete) 2014-03-19 17:00:28 +04:00
Dmitry Stogov
aa5f55306b Refactored EG(active_symbol_table) to be zend_array* instead of HashTable* 2014-03-17 23:15:22 +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
Dmitry Stogov
2eb980f614 IS_REFERENCE with refcount==1 should be handled as ordinal value 2014-03-06 12:37:46 +04:00
Dmitry Stogov
3733737328 Handle interned strings as non-refcounted scalars 2014-03-05 13:55:56 +04:00
Dmitry Stogov
54095e8c56 Converting from reference to regular value 2014-02-28 11:03:05 +04:00