Nikita Popov
dc9991b167
Remove static calls from incompatible $this context
2015-01-17 18:26:44 +01:00
Dmitry Stogov
b46894d104
Partially revert 3477135cd1
2015-01-16 02:21:27 +03:00
Dmitry Stogov
1c5e914616
Fixed build without alloca()
2015-01-15 21:43:17 +03:00
Dmitry Stogov
12cbb9c156
Merge branch 'master' of git.php.net:php-src
...
* 'master' of git.php.net:php-src:
updated NEWS
updated NEWS
PDO_MySQL: Differentiate between linux and win32 when passing unix_socket
bump year
bump year
Bump year
2015-01-15 21:09:20 +03:00
Dmitry Stogov
b476c27135
Fixed double free
2015-01-15 21:08:43 +03:00
Dmitry Stogov
3477135cd1
Avoid usage of uninitialized data
2015-01-15 21:08:21 +03:00
Xinchen Hui
fc33f52d8c
bump year
2015-01-15 23:27:30 +08:00
Dmitry Stogov
34723d1b75
Fixed malloc/emalloc mess
2015-01-15 18:05:58 +03:00
Dmitry Stogov
989daeb5bb
Initialize ht->nTableMask
2015-01-15 15:21:38 +03:00
Anatol Belski
1af91d944a
optimize offset computation
2015-01-15 11:18:40 +01:00
Anatol Belski
706b7c6e07
don't return value in the void function
2015-01-15 11:18:39 +01:00
Anatol Belski
cdfafd3f38
fix "unknown void * size" err
2015-01-15 11:18:38 +01:00
Xinchen Hui
8a0bc38535
Merge branch 'zend_sort' of https://github.com/laruence/php-src
2015-01-14 22:15:41 -05:00
Dmitry Stogov
90c20b4c24
Fixed typo
2015-01-14 21:09:06 +03:00
Dmitry Stogov
2325758624
Improve "instanceof". Interfaces of the left operand should be checked only if the right operand is interafce itself.
2015-01-14 15:06:26 +03:00
Anatol Belski
d5b5ad72b6
cleanup
2015-01-14 12:32:23 +01:00
Anatol Belski
8e3764e287
fixed zend_hash_init() when the lzcnt instruction isn't supported
2015-01-14 12:32:23 +01:00
Xinchen Hui
2193de0d18
Faster sorting algo
2015-01-14 18:02:41 +08:00
Dmitry Stogov
3e3b006738
Reorder conditions to make "fast paths" shorter
2015-01-13 15:31:42 +03:00
Dmitry Stogov
5a24ac8853
Improved access to object properties (cache property offset instead of pointer to property_info).
2015-01-13 11:33:00 +03:00
Dmitry Stogov
58efbf0a92
Fixed possible double free
2015-01-13 11:32:36 +03:00
Dmitry Stogov
7e93de101f
Handle run-time cache for static properties directly in executor.
...
Removed cache_slot argument in zend_std_get_static_property() and zend_std_unset_static_property().
2015-01-13 09:33:15 +03:00
Dmitry Stogov
d810cf816b
Fixed possible crash
2015-01-13 08:30:54 +03:00
Xinchen Hui
2d8fd4b335
Add hinting
2015-01-12 22:06:40 -05:00
Dmitry Stogov
dbe66fb2cf
Improved access to static property. Now we cache pointers to zval instead of pointers to property_info.
2015-01-13 03:32:51 +03:00
Bob Weinand
0445974cb1
Only backup vm_stack* if generator->stack has not been freed
2015-01-12 22:31:07 +01:00
Dmitry Stogov
916d5ece39
Optimized error_reporting() similar to silence operator (ZEND_BEGIN_SILENCE opcode).
2015-01-12 23:50:03 +03:00
Dmitry Stogov
c5047d1f11
Use FAST_ZPP in few more frequently used functions
2015-01-12 19:26:12 +03:00
Xinchen Hui
2f1ddff2a5
Faster strrpos implementation
2015-01-12 17:24:37 +08:00
Xinchen Hui
31817447cc
Faster zend_memnstr for long text
2015-01-12 15:34:46 +08:00
Stanislav Malyshev
b7a7b1a624
trailing whitespace removal
2015-01-10 15:07:38 -08:00
Xinchen Hui
84f2311bc9
Fixed #68779 (Incorrect sizeof)
2015-01-10 10:58:22 -05:00
Nikita Popov
e9068cefb4
Make empty list() check stricter
...
Now also includes list()s with just commas in it.
2015-01-09 18:27:06 +01:00
Nikita Popov
41a249fef6
Fix bug #68775
2015-01-09 17:59:41 +01:00
Guilherme Blanco
d51fb69c01
Removed parsing support traits to have extends and implements.
2015-01-09 15:45:02 +01:00
Guilherme Blanco
f48c232740
Decoupled class declaration statement into more granular pieces.
2015-01-09 15:45:01 +01:00
Nikita Popov
3e826c9736
Fix the same leak with %=
2015-01-07 23:21:12 +01:00
Nikita Popov
98c2ceacf8
Fix leak for compound shift self-assign error cases
2015-01-07 23:13:45 +01: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
Nikita Popov
2269b1801d
Add missing string cast for non-cv var fetches
2015-01-04 18:07:44 +01:00
Nikita Popov
69a4b135f3
Fix use after free for variables with integer names
2015-01-04 17:57:23 +01:00
Anatol Belski
95e04fed24
cleanup redundand macros
2014-12-31 16:25:42 +01:00
Andrea Faulds
41e3fdba8e
Make zend_parse_parameters share fast zpp implementation where possible
...
Rename shared implementation functions and build them unconditionally
Don't fail on empty path for zend_parse_arg_path
Update type names
Fix behaviour of by-reference "z"
Make 'o' use zend_parse_arg_object
Fix NULL string check in zend_parse_arg_path(_str)
2014-12-29 12:28:28 +00:00
Dmitry Stogov
cd5ea1619e
Micro optimization for better register allocation
2014-12-29 14:21:16 +03:00
Dmitry Stogov
0fa50fb95d
Reored conditions
2014-12-29 14:20:52 +03:00
Dmitry Stogov
d909a837e2
Cleanup
2014-12-29 13:38:36 +03:00
Kalle Sommer Nielsen
2bcf69d073
Fixed bug #68676 (Explicit Double Free)
2014-12-29 10:55:14 +01:00
Xinchen Hui
3bd96e0735
Use internd string as key
2014-12-29 14:35:08 +08:00
Anatol Belski
68dd8e8bd7
fix invalid free mentioned in bug 68665
...
thanks honey at internot dot info
2014-12-28 16:36:07 +01:00
Anatol Belski
67c47e7861
added test for bug #68665
2014-12-28 16:29:07 +01:00
Dmitry Stogov
107ae86ca6
Introduce specialized functions to compare with integer and string, to eliminate repeatable checks on each loop iteration in in_array() function.
2014-12-27 11:11:40 +03:00
Dmitry Stogov
37466b0368
Use special flag (HASH_FLAG_INITIALIZED) instead of (nTableMask == 0) to indicate that HashTable is allocated.
...
Make nTableMask to be 0 for packed arrays.
Remove checks fo HASH_FLAG_PACKED in zend_hash_find/zend_hash_del and family (string keys are resolved through uninitialized_bucket).
Change HashTable layout for better locality.
2014-12-27 11:07:12 +03:00
Nikita Popov
2d212b426a
Drop duplicate arg from hash_get_current_key_ex
2014-12-26 21:06:18 +01:00
Nikita Popov
3d12fc796b
Small cleanups in hash implementation
...
* Drop unnecessary checks in non-inlined part of numeric key
detection
* Drop zend_hash_apply_deleter in favor of zend_hash_del_el.
Also move block/unblock interruption macros in there.
2014-12-26 21:06:18 +01:00
Dmitry Stogov
ab0b15b8ff
Optimized destruction of extra arguments passed to user functions.
...
If no refcounted arguments are passed, then destruction code is not triggered at all.
(Full rebuild required)
2014-12-26 22:34:44 +03:00
Anatol Belski
86af370b81
remove unused variable
2014-12-24 14:14:29 +01:00
Anatol Belski
385bda6cdf
C89 compat
2014-12-24 14:14:28 +01:00
Dmitry Stogov
f2c2acb9a9
For disabled function, to disable arguments checks, we have to reset num_args and some related flags (in addition to arg_info)
2014-12-24 15:34:52 +03:00
Dmitry Stogov
c42ac09518
Added new API function 'zend_string* zend_string_tolower(zend_string*)'.
...
It simplifies code and avoids unnecessary allocation and copying if string is already in lower case.
2014-12-24 15:04:51 +03:00
Anatol Belski
e46852d2d5
better fix for script encoding ini
2014-12-23 17:33:30 +01:00
Anatol Belski
e2e5ed06d1
fix NULL deref when the script encoding wasn't previously set
2014-12-23 17:09:13 +01:00
Dmitry Stogov
106b1017d4
API for fast construction of packed arrays
2014-12-23 19:08:28 +03:00
K.
c462ff7ac2
zend_hash_do_resize: fix compacting condition
...
nNumUsed should always be greater or equal to nNumOfElements so original condition is never true and arrays are always doubled in size and compaction is never triggered
2014-12-23 15:32:15 +01:00
Anatol Belski
e60b7207db
cleanup
2014-12-23 13:00:29 +01:00
Xinchen Hui
62e2973602
Revert "Improve Hash foreach macros"
...
This reverts commit 95bb0a0f7a
.
2014-12-23 03:51:06 -05:00
Xinchen Hui
95bb0a0f7a
Improve Hash foreach macros
2014-12-23 00:50:39 -05:00
Xinchen Hui
4b26c5d004
Please becareful with the tailed space after slash
2014-12-22 22:59:17 -05:00
Andrea Faulds
b2853e7494
share that hunk of code
2014-12-23 01:51:19 +00:00
Dmitry Stogov
f3506dfacb
Improved get_object_vars()
2014-12-23 02:49:47 +03:00
krakjoe
854ccf50c9
remove 3.0 from excluded versions because limitation lifted by native-tls
2014-12-22 21:32:14 +00:00
Dmitry Stogov
fd4844e079
Removed useless checks
2014-12-22 19:04:29 +03:00
Dmitry Stogov
2646f7bcb9
Don't count variadic argument in zend_func.common.num_args. This allows faster CALL/RETURN code.
2014-12-22 16:44:39 +03:00
Dmitry Stogov
552c06d439
typo
2014-12-22 12:31:00 +03:00
Xinchen Hui
b5b617674e
Micro optimaztion (yeah, I know compiler supposed to do that)
2014-12-22 00:10:46 -05:00
Xinchen Hui
cc4a198d19
Fixed segfault
2014-12-21 23:18:56 -05:00
Xinchen Hui
c24125e2f9
Micro optimization
2014-12-21 23:16:25 -05:00
Xinchen Hui
201e1b8a8d
Micro optimizations
2014-12-21 22:35:25 -05:00
Andrea Faulds
e5eb9530ab
Use "float" and "integer" in typehint and zpp errors
2014-12-21 13:23:02 +00:00
Dmitry Stogov
0833fd4619
Allow arrays with define(), to match const syntax support
2014-12-21 03:03:49 +00:00
Nikita Popov
c94f62d0d9
Merge branch 'PHP-5.6'
...
Conflicts:
ext/opcache/Optimizer/pass2.c
2014-12-19 21:51:05 +01:00
Nikita Popov
87ccf50bad
Merge branch 'PHP-5.5' into PHP-5.6
2014-12-19 21:46:38 +01:00
Nikita Popov
aa394e70ff
Fix bug #67111
...
Loop variables need to be freed for both "break" and "continue".
I'm adding the test to Zend/ because it's good to have a test for
this even without opcache.
2014-12-19 21:42:42 +01:00
Dmitry Stogov
00628afd74
Fixed memory leaks
2014-12-19 19:43:17 +03:00
Dmitry Stogov
441270db2c
Simplify condition
2014-12-19 13:06:34 +03:00
Anatol Belski
6b59b276fd
C89 compat
2014-12-19 07:17:30 +01:00
Andrea Faulds
bae46f307c
Unicode Codepoint Escape Syntax
2014-12-19 00:40:59 +00:00
Nikita Popov
0f815642e0
Drop ZEND_PRINT opcode in favor of ZEND_ECHO
...
The return value long(1) is an IS_CONST operand now.
2014-12-18 14:39:40 +01:00
Anatol Belski
e8acb9ff26
Merge remote-tracking branch 'origin/master' into native-tls
...
* origin/master:
fix integral constant overflow warning
Use HUGE PAGES for opcahce SHM, if available.
2014-12-17 17:46:48 +01:00
Anatol Belski
79354ba6d0
fix integral constant overflow warning
...
as it's promoted to size_t when passed to ZEND_CALL_ARG
2014-12-17 16:47:05 +01:00
Anatol Belski
9c354ba182
Merge remote-tracking branch 'origin/master' into native-tls
...
* origin/master:
Better fix for #68601 for perf 81e9a993f2
Added EXPECTED(). Most functions have arguments.
2014-12-17 11:53:45 +01:00
Dmitry Stogov
4d21ad31dd
Added EXPECTED(). Most functions have arguments.
2014-12-17 12:16:02 +03:00
Anatol Belski
4acc56d5b2
Merge remote-tracking branch 'origin/master' into native-tls
...
* origin/master:
fix unserializer patch
move this entry to the correct version
add missing NEWS entry
add missing NEWS entry
Updated or skipped certain 32-bit tests
add NEWS entry for #68594
5.4.37
add more BC breaks
update news
add CVE
add missing test file
Fix bug #68594 - Use after free vulnerability in unserialize()
Fix typo
Hash value must not zero?
2014-12-17 05:29:36 +01:00
Xinchen Hui
cf84bf53ea
Merge branch 'fix-typo' of https://github.com/gustavotemple/php-src
2014-12-17 11:52:42 +08:00
Xinchen Hui
cfc8b57342
Merge branch 'master' of https://git.php.net/repository/php-src
2014-12-17 11:52:19 +08:00
Anatol Belski
2eef2abee5
Merge remote-tracking branch 'origin/master' into native-tls
...
* origin/master:
Optimize argument passing handlers:
Fix pcre non-FAST_ZPP build
Conflicts:
Zend/zend_compile.c
Zend/zend_execute.h
Zend/zend_vm_def.h
Zend/zend_vm_execute.h
ext/pcre/php_pcre.c
2014-12-16 17:13:47 +01:00
Dmitry Stogov
3a18597774
Optimize argument passing handlers:
...
- predcalculate offsets of passed argument and store it in opline->result.var for ZEND_SEND_*;
- don't update "number of passed arguments" op each ZEND_SEND_* opcode, store it on call frame creation
- Change ZEND_HANDLE_EXCEPTION to determine "number of passed arguments" in incomplete calls fefore freeing
2014-12-16 18:40:52 +03:00