Xinchen Hui
39f0950746
Fixed bug #71336 (Wrong is_ref on properties as exposed via get_object_vars())
2016-01-13 17:38:18 +08:00
Dmitry Stogov
50be2c89be
Fixed bug #71248 (Wrong interface is enforced)
2016-01-13 11:41:57 +03:00
Julien Pauli
bec0aec116
Trigger op_array_handler() if HAVE_OP_ARRAY_HANDLER is set
2016-01-12 15:19:14 +01:00
Xinchen Hui
16a2b47394
Fixed bug #71300 (Segfault in zend_fetch_string_offset)
2016-01-07 07:05:17 -08:00
Bob Weinand
83cb751047
Fix accidental zval_dtor() usage
2016-01-07 15:12:50 +01:00
Bob Weinand
033d608771
Fixed bug #71297 (Memory leak with yield from)
2016-01-07 11:56:21 +01:00
Bob Weinand
654c8aedd1
Fixed bug #71275 (Bad method called on cloning an object having a trait)
2016-01-05 16:27:24 +01:00
Xinchen Hui
bce7ed1859
Duplicated i
2016-01-03 14:06:52 +08:00
Xinchen Hui
97a9470d97
bump year which is missed in rev 49493a2
2016-01-02 17:56:11 +08:00
Xinchen Hui
3537e95dae
bump year which is missed in rev 49493a2
2016-01-02 17:51:24 +08:00
Lior Kaplan
2eb1f38d24
Happy new year (Update copyright to 2016)
2016-01-01 20:03:16 +02:00
Lior Kaplan
ed35de784f
Merge branch 'PHP-5.6' into PHP-7.0
...
* PHP-5.6:
Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
c51e73c803
Happy new year (Update copyright to 2016)
2016-01-01 19:23:04 +02:00
Derick Rethans
5362f0ad7f
MFH: Fix lineno for finally FAST_CALL and JMP
2015-12-31 09:46:43 +00:00
Xinchen Hui
6700be67f5
Fixed bug #71221 (Null pointer deref (segfault) in get_defined_vars via ob_start)
2015-12-25 20:32:26 -08:00
Levi Morrison
2a7eeff33e
Remove mentions of "type hint" and "typehint"
2015-12-24 15:19:31 +01:00
Julien Pauli
8182f0ff2a
Merge branch 'PHP-5.6' into PHP-7.0
...
* PHP-5.6:
Fixed test
2015-12-24 14:44:33 +01:00
Julien Pauli
0bdc2923b1
Fixed test
2015-12-24 14:44:07 +01:00
Julien Pauli
048fb4b00f
Merge branch 'PHP-5.6' into PHP-7.0
...
* PHP-5.6:
Fixed and improved tests
test to function socket_getopt();
test to function socket_clear_error();;
test to function socket_shutdown();
test to function socket_send();
test to function gethostname ( void );
test to function DateTimeZone::getLocation();
test to function stream_get_transports();
test to function stream_get_wrappers();
test to function stream_socket_enable_crypto();
test to function stream_socket_get_name();
Create stream_socket_recvfrom.phpt
test to stream function set_file_buffer.phpt();
test to function PDO_getAvaliableDrivers;
test to misc. function connection_status();
test to function connection_aborted();
test to function memory_get_peak_usage();
2015-12-24 14:08:59 +01:00
Julien Pauli
d73d9fecf6
Fixed and improved tests
2015-12-24 14:08:44 +01:00
marcosptf
a82f76634a
test to function memory_get_peak_usage();
...
add new test to uncoverage function;
please, @laurence, see if this path is correct!
Thanks
2015-12-24 10:42:22 +01:00
Xinchen Hui
64071fc531
Superfluous semicolon
2015-12-24 10:41:05 +08:00
Bob Weinand
3e3d0290ff
Added test for (long-ago fixed) bug #70083
2015-12-22 17:39:36 +01:00
Dmitry Stogov
0402f05ba3
Fixed possible crash on Zend/tests/bug71154.phpt
2015-12-21 15:57:53 +03:00
Anatol Belski
53bfb6618d
Revert "Partially fix bug #71129 "
...
This reverts commit 4c55669caa
.
The way it is fixes doesn't satisfy every SAPI, so a better solution
is yet to work out.
2015-12-21 12:09:24 +01:00
Anatol Belski
4c55669caa
Partially fix bug #71129
2015-12-20 15:25:11 +01:00
Xinchen Hui
a21b0942fa
Fixed bug #71165 (-DGC_BENCH=1 doesn't work on PHP7)
2015-12-18 21:52:05 -08:00
Xinchen Hui
1d79011fb9
Merge branch 'PHP-7.0' of git.php.net:/php-src into PHP-7.0
2015-12-18 21:40:48 -08:00
Xinchen Hui
eb4ce3f1a8
Fixed bug #71163 (Segmentation Fault: cleanup_unfinished_calls)
2015-12-18 21:40:20 -08:00
Andrea Faulds
42c8f5e91d
Fix bug #70804
...
This follows on from a4648ded43
and
4e01269082
.
Both -(+0.0) and +(-0.0) behaved incorrectly for the same reason.
2015-12-19 02:25:44 +00:00
Andrea Faulds
a4648ded43
Fix bug #52355
2015-12-17 22:39:29 +00:00
Nikita Popov
a917840f38
Fixed iter leak on by-ref foreach over const/tmp array
...
FE_FREE does not unregister the iter for plain arrays. So always
wrap into a REF wrapper, even if not strictly necessary, in
RESET_RW. Alternatively we could use a flag to distinguish plain
positions and interators.
Also added a check for leaked iterators in shutdown_executor.
2015-12-17 23:21:48 +01:00
Nikita Popov
6a4c02e107
Fixed bug #71154
2015-12-17 22:20:29 +01:00
Dmitry Stogov
9e44b6a61e
Fixed incorrect exception handling
2015-12-17 14:16:19 +03:00
Nikita Popov
7dc5bc5063
Do not swap operands in array addition
...
As we support constant array operands nowadays, the original check
didn't work anymore.
2015-12-14 00:29:05 +01:00
Xinchen Hui
07b33992a2
Fixed bug #71109 (ZEND_MOD_CONFLICTS("xdebug") doesn't work)
2015-12-13 05:06:08 -08:00
Xinchen Hui
b101a6bbd4
Use format string
2015-12-12 18:45:11 -08:00
Xinchen Hui
778e5f3da5
Fixed bug #71092 (Segmentation fault with return type hinting)
2015-12-11 09:11:28 -08:00
Nikita Popov
fd3ece8578
Fix bug #71086
2015-12-11 16:05:49 +01:00
Remi Collet
66398757fc
Merge branch 'PHP-5.6' into PHP-7.0
...
* PHP-5.6:
NEWS
Fix Bug #71089 No check to duplicate zend_extension
2015-12-11 13:22:55 +01:00
Remi Collet
410eacc1a9
Fix Bug #71089 No check to duplicate zend_extension
2015-12-11 13:21:24 +01:00
Nikita Popov
5c5209d676
Fix cleanup in bug70748.phpt
...
git add Zend/tests usable again...
2015-12-10 19:14:49 +01:00
Nikita Popov
37f3425263
Fix Foo::${42} and similar
...
Fixes segfault on direct use, segfault on opcache evaluated use,
leak on temporary use.
Fixes analogeous segfault for ${42} on opcache eval as well.
2015-12-10 18:14:40 +01:00
Xinchen Hui
4c379392b2
Fixed bug #71067 (Local object in class method stays in memory for each call)
2015-12-09 21:07:59 +08:00
Xinchen Hui
0495bf5650
Revert "fix typos "paramer" -> "parameters""
...
ABI BC break
This reverts commit 6ac12f1337
.
2015-12-08 10:52:50 +08:00
Márcio Almada
6ac12f1337
fix typos "paramer" -> "parameters"
2015-12-07 14:48:26 +08:00
Bob Weinand
559ede17e1
Fixed bug #71013 (Incorrect exception handler with yield from)
2015-12-06 02:45:19 +01:00
Dmitry Stogov
59424bb7bd
Fixed bug #71006 (symbol referencing errors on Sparc/Solaris)
2015-12-03 13:28:41 +03:00
Dmitry Stogov
25c5d185fc
Fixed bug #70997 (When using parentClass:: instead of parent::, static context changed)
2015-11-30 16:52:57 +03:00
Xinchen Hui
1f65006fce
Fixed bug #70931 (Two errors messages are in conflict)
2015-11-28 23:43:41 -08:00
Xinchen Hui
9397f52724
Fixed Bug #70967 (Weird error handling for __toString when Error is thrown)
2015-11-28 23:38:19 -08:00
Andrea Faulds
8907da99b8
Set called_scope in Closure::call (fixes bug #70987 )
2015-11-27 15:06:13 +00:00
Nikita Popov
99dd7ee80b
Forbid namespace\int type hint as well
2015-11-26 16:56:08 +01:00
Bob Weinand
2de8915dea
Fixed bug causing exception not being thrown immediately into a generator yielding from an array
2015-11-25 23:09:44 +01:00
Xinchen Hui
d6f39a1011
Merge branch 'PHP-7.0' of git.php.net:/php-src into PHP-7.0
2015-11-25 19:12:40 +08:00
Xinchen Hui
3cdbe347ae
Always lower name
2015-11-25 19:11:22 +08:00
Xinchen Hui
05738eb71a
Revert "Improved fix for Fully qualified (leading backslash) type names must fail"
...
This reverts commit 00865ae22f
.
2015-11-25 19:06:42 +08:00
Bob Weinand
73a92964ff
Fixed bug #70965 (yield from with a common iterator primes too much)
2015-11-25 09:54:24 +01:00
Xinchen Hui
00865ae22f
Improved fix for Fully qualified (leading backslash) type names must fail
...
it now all fails with COMPILE_ERROR instead of syntax error for T_ARRAY
but COMPILE_ERROR for int
2015-11-25 11:27:32 +08:00
Bob Weinand
80d9dcafe0
Fixed bug #70904 (yield from incorrectly marks valid generator as finished)
2015-11-24 23:43:34 +01:00
Bob Weinand
569763cb1a
Fix scalar type names with leading backslash
2015-11-24 21:39:06 +01:00
Xinchen Hui
7e9f416218
Fixed bug #70959 (ArrayObject unserialize does not restore protected fields)
2015-11-23 23:15:33 +08:00
Xinchen Hui
6313e16a04
Improved fix for bug (count on symbol table)
2015-11-23 06:12:03 -08:00
Xinchen Hui
45c5e27183
Fixed test
2015-11-23 18:33:14 +08:00
Xinchen Hui
51ccc88b87
Port fix to 7.0
2015-11-23 18:31:56 +08:00
Xinchen Hui
397be4ff54
Merge branch 'PHP-5.6' into PHP-7.0
...
Conflicts:
Zend/zend_compile.c
2015-11-23 18:30:41 +08:00
Xinchen Hui
a2b85ddecf
Fixed bug #70958 (Invalid opcode while using ::class as trait method paramater default value)
2015-11-23 18:29:59 +08:00
Xinchen Hui
1b16c2f41c
Merge branch 'PHP-5.6' into PHP-7.0
...
Conflicts:
Zend/zend_compile.c
2015-11-23 12:22:17 +08:00
Xinchen Hui
ab17840d33
Fixed bug #70957 (self::class can not be resolved with reflection for abstract class)
2015-11-23 12:20:44 +08:00
Xinchen Hui
31d93fcf4b
Port the fix of 5.6 to 7.0
2015-11-21 05:41:53 -08:00
Xinchen Hui
c6961cb41b
Merge branch 'PHP-5.6' into PHP-7.0
...
Conflicts:
Zend/tests/bug70944.phpt
Zend/zend_exceptions.c
2015-11-21 05:03:20 -08:00
Xinchen Hui
205e0ba81d
Update test script
2015-11-21 05:01:51 -08:00
Xinchen Hui
cbc71995a8
Unused var
2015-11-21 04:54:48 -08:00
Xinchen Hui
7b195c9875
Improved fix for bug #70944
2015-11-21 00:27:56 -08:00
Xinchen Hui
4674f18a4b
Improved previously fix a little
2015-11-20 06:54:57 -08:00
Xinchen Hui
519f9bc675
Fixed bug #70947 (INI parser segfault with INI_SCANNER_TYPED)
2015-11-20 06:37:38 -08:00
Xinchen Hui
a2e4e64682
Merge branch 'PHP-5.6' into PHP-7.0
...
Conflicts:
Zend/zend_exceptions.c
2015-11-20 16:38:00 +08:00
Xinchen Hui
a1c887964e
Fixed bug #70944 (try{ } finally{} can create infinite chains of exceptions)
2015-11-20 16:24:53 +08:00
Anatol Belski
1934d6d9ab
fix test title
...
c/p mistake :)
2015-11-15 00:03:40 +01:00
Taoguang Chen
617698dfe0
Fixed bug #70914 zend_throw_or_error() format string vulnerability
2015-11-14 23:44:59 +01:00
Xinchen Hui
25de928df7
Fixed bug #70912 (Null ptr dereference instantiating class with invalid array property)
2015-11-13 21:24:42 +08:00
Xinchen Hui
310fc87c2d
SKIP on slow debug version PHP
2015-11-13 14:00:01 +08:00
Anatol Belski
cc10da474d
fixed typo
2015-11-12 13:37:45 +01:00
Anatol Belski
9c4fd36783
add test for bug #70898
2015-11-12 09:28:10 +01:00
Xinchen Hui
c2de445f79
Also protects this one
2015-11-12 14:51:19 +08:00
Xinchen Hui
53c03115cf
Re-fixed #70895
2015-11-12 14:35:34 +08:00
Xinchen Hui
2bed2152e6
Revert "Fixed bug Bug #70895 null ptr deref and segfault"
...
This reverts commit 8eef11d317
.
2015-11-12 14:34:00 +08:00
Xinchen Hui
c245fd7d91
Revert "refix bug #70895 "
...
This reverts commit 93240102e0
.
2015-11-12 14:33:14 +08:00
Xinchen Hui
75f85288f4
Revert "Fixed bug #70898 (SIGBUS/GPF zend_mm_alloc_small (zend_alloc.c:1291))"
...
This reverts commit e4e54f33ce
.
2015-11-12 14:32:35 +08:00
Xinchen Hui
e4e54f33ce
Fixed bug #70898 (SIGBUS/GPF zend_mm_alloc_small (zend_alloc.c:1291))
...
Include tail \0
2015-11-12 14:18:02 +08:00
Anatol Belski
93240102e0
refix bug #70895
...
move this code to where it belongs, no behavior change to actual
throwing function, thus retaining compat with old ZPP
2015-11-12 01:39:02 +01:00
Anatol Belski
8eef11d317
Fixed bug Bug #70895 null ptr deref and segfault
2015-11-12 00:52:36 +01:00
Anatol Belski
b89f451694
adjust test expectation
2015-11-11 09:47:29 +01:00
Anatol Belski
3cdc438e53
fix test filename and title
2015-11-11 09:47:24 +01:00
Xinchen Hui
82f503f587
Re-Fixed bug #70249 (Segmentation fault while running PHPUnit tests on phpBB 3.2-dev)
...
Let's fixed this in the root instead
2015-11-11 12:32:46 +08:00
Xinchen Hui
4803914ae6
Unused var
2015-11-10 15:54:32 +08:00
Dmitry Stogov
d66d1b97aa
Fixed incorrect order of free/finally on exception
2015-11-10 10:10:39 +03:00
Anatol Belski
795af791b0
Merge branch 'PHP-7.0' of git.php.net:php-src into PHP-7.0
2015-11-10 00:41:40 +01:00
Andrea Faulds
37b64de20f
Merge branch 'use_ZEND_STRL_for_builtin_types' into PHP-7.0
2015-11-09 23:40:49 +00:00
Anatol Belski
a3f1154b3d
additional catch to bug #70863
2015-11-10 00:38:11 +01:00
Anatol Belski
2e38918ba4
add test for eb32da13
2015-11-09 22:45:22 +01:00
Dmitry Stogov
c9eacb181c
Added tests
2015-11-09 23:54:09 +03:00
Andrea Faulds
dae37661d9
Use ZEND_STRL macro for builtin_types
2015-11-09 11:15:58 +00:00
Xinchen Hui
d70aa14f2c
Fixed bug #70323 (Regression in zend_fetch_debug_backtrace() can cause segfaults)
2015-11-09 17:14:15 +08:00
Xinchen Hui
83de5364b7
manually apply the typo fix in master
2015-11-07 23:03:25 -08:00
Xinchen Hui
2d8d97cee2
Fixed bug #70873 (Regression on private static properties access)
2015-11-07 06:50:36 -08:00
Nikita Popov
99d818f1e9
Don't propagate into ops that error on non-string
...
To properly support this make update_opN_const fallible -- they
are not always called through replace_with_const.
2015-11-07 12:04:51 +01:00
Nikita Popov
00b37e718d
Strip leading backslash in update_opN_const
2015-11-07 12:04:51 +01:00
Nikita Popov
632bee4abb
Fix update_opX_const lowercasing
...
It was lowering in-place.
2015-11-07 12:04:51 +01:00
Anatol Belski
d59eb9fcc3
fix decrement_function regarding bug #70863
2015-11-06 23:07:21 +01:00
Anatol Belski
8155ecba61
Fixed bug #70863 Incorect logic to increment_function for proxy objects
2015-11-06 23:07:16 +01:00
Anatol Belski
6897c1116a
no more dev ZEND_VERSION
2015-11-06 23:07:10 +01:00
Xinchen Hui
27aef97f65
Fixed bug #70868 (PCRE JIT and pattern reuse segfault)
2015-11-06 11:37:17 +08:00
Márcio Almada
283b6275df
add failing test for bug #70868
2015-11-06 11:34:45 +08:00
Anatol Belski
9968129831
don't get invalid chmod mode through
2015-11-05 14:46:23 +01:00
Anatol Belski
dea14fc707
zero cwd buffer before passing to chmod
2015-11-05 14:46:18 +01:00
Xinchen Hui
2f2653aa77
Fixed bug #70805 (Segmentation faults whilst running Drupal 8 test suite)
2015-11-03 17:53:56 -08:00
Xinchen Hui
227c898cd9
Fixed test
2015-11-02 10:58:55 +08:00
Xinchen Hui
37ed0dafe4
Fixed bug #70828 (php-fpm 5.6 with opcache crashes when referencing a non-existent constant)
2015-11-02 10:47:02 +08:00
Dmitry Stogov
eb32da13cd
Fix frequent reallocations with many small strings
2015-10-27 17:07:58 +01:00
Dmitry Stogov
0172f198e3
Fixed inconsistent exception handling (uopz/tests/006.phpt was failed when PHP build with --disable-gcc-global-regs).
2015-10-26 16:01:20 +03:00
Xinchen Hui
5767f2b648
Fixed bug #70785 (Infinite loop due to exception during identical comparison)
2015-10-26 11:15:17 +08:00
Bob Weinand
ac58d21aa3
Fix refcount reaching 2^32 - 1 for resources
...
Happens e.g. in proc_close() when nothing is referencing the file handles, e.g. they have refcount 0 when passed to zend_list_close() and then zend_list_delete() which decrements it to (uint32_t) -1
2015-10-25 18:47:50 +01:00
Nikita Popov
b9cc3176eb
Fix bug #70782
2015-10-24 23:19:02 +02:00
Xinchen Hui
6ad2c3eb33
Revert "Ensure proper exception handling and EX(opline) state in USER_OPCODE handler"
...
read: http://news.php.net/php.internals/88887
This reverts commit 808f62bb4d
.
2015-10-20 08:12:04 -07:00
Xinchen Hui
673ad62eed
Regenerate zend_ini_scanner.c
2015-10-20 16:58:30 +08:00
Xinchen Hui
c7cb40353c
Merge branch 'PHP-5.6' into PHP-7.0
...
Conflicts:
Zend/zend_ini_scanner.c
2015-10-20 13:26:02 +08:00
Xinchen Hui
d5f76caf6c
Fixed bug #70748 (Segfault in ini_lex () at Zend/zend_ini_scanner.l)
2015-10-20 13:20:56 +08:00
Aaron Piotrowski
c100a742dc
Fix missed assertion tests
2015-10-18 02:23:43 -05:00
Nikita Popov
e3e92e96c1
Fixed bug #70430
2015-10-15 22:14:23 +02:00
Nikita Popov
06f38d36a8
Reindent zend_yytnamerr
...
Separating this whitespace change from the next diff.
2015-10-15 22:13:14 +02:00
Bob Weinand
60b4355168
Do not create a fake Closure for real Closures
...
That is solved by just returning the Closure as is, which is safe due to Closures being immutable objects
2015-10-14 12:07:33 +02:00
Dmitry Stogov
d949c3b6e5
Fixed incorrect "peak" memory consumption calculation.
2015-10-13 15:20:17 +03:00
Xinchen Hui
a8ae88162f
Fixed bug #70689 (Exception handler does not work as expected)
2015-10-13 17:40:58 +08:00
Nikita Popov
7597a06562
Add more tests for closure binding
2015-10-12 20:37:14 +02:00
Dmitry Stogov
23b372d358
Forbid "fake" closure rebinding
2015-10-12 20:34:08 +02:00
Anatol Belski
dcbbf7c38d
increase API versions
2015-10-12 20:17:22 +02:00
Xinchen Hui
8732ead953
Double declaration
2015-10-12 10:42:04 +08:00
Nikita Popov
c85ad5d0be
Merge branch 'PHP-5.6' into PHP-7.0
...
Conflicts:
Zend/zend_closures.c
2015-10-10 15:00:41 +02:00
Nikita Popov
d7d01fc9a3
Fixed bug #70685
...
Doing a less intrusive variant of the PHP 7.0 fix for 5.6.
2015-10-10 14:59:21 +02:00
Nikita Popov
4b821f0fc6
Normalize rebinding failures
...
Move all rebinding checks into one function to make sure they stay
in sync. Normalize return value to be NULL for all rebinding
failures, instead of returning an improperly bound closure in some
cases.
2015-10-10 13:56:36 +02:00
Nikita Popov
d677b25b1c
Merge branch 'PHP-5.6' into PHP-7.0
2015-10-09 23:28:58 +02:00
Nikita Popov
e19423f3cb
Improve previous fix
...
Don't forbid null binding on plain functions.
2015-10-09 23:28:24 +02:00
Nikita Popov
f6ae19f158
Merge branch 'PHP-5.6' into PHP-7.0
2015-10-09 23:06:32 +02:00
Nikita Popov
bbae7ddf29
Fixed bug #70681
2015-10-09 23:01:23 +02:00
Dmitry Stogov
0847681b1a
Fixed bug #70630 (Closure::call/bind() crash with ReflectionFunction->getClosure())
2015-10-09 11:48:13 +03:00
Dmitry Stogov
c6af0aa33f
Fixed reference cuntmting for closures (previously we didn't increment reference counter for "internal" closures)
2015-10-09 02:39:07 +03:00
Dmitry Stogov
93748bf9dd
Fixed infinity recurion if we create closure on top of other closure.
2015-10-09 02:37:51 +03:00
Dmitry Stogov
05bd331c6a
Fixed use after free
2015-10-09 01:09:22 +03:00
Dmitry Stogov
91fb3a7b27
Fixed bug #70674 (ReflectionFunction::getClosure() leaks memory when used for internal functions)
2015-10-09 00:45:02 +03:00
Nikita Popov
cc3c425af8
Fix bug #70662
...
This replaces add_new with update for the RW case. This should not
be problematic for performance, as this branch throws a notice.
Alternatively add_new could also be replaced with add. I went with
update, because it makes $a[0] += 1 behavior the same as
$a[0] = $a[0] + 1.
2015-10-08 11:03:39 +02:00
Márcio Almada
ddb6d7801e
Fix bug #70650
2015-10-07 16:25:59 +02:00
Dmitry Stogov
b8b335c492
Restored the original (php-5) behavior of convert_to_cstring(). It was broken in php7 by mistake and caused problems in ext/pgsql/tests/bug46408.phpt.
2015-10-07 04:26:26 +03:00
Dmitry Stogov
e0b3b3c752
Revert "Fixed bug #70630 (Closure::call/bind() crash with ReflectionFunction->getClosure())"
...
This reverts commit 517b553625
.
2015-10-06 23:59:36 +03:00
Dmitry Stogov
e193d35c1e
Revert "Improve 517b55362
(scope rebinding on method Closures)"
...
This reverts commit 881c502520
.
2015-10-06 23:48:15 +03:00
Dmitry Stogov
24e88348f3
Revert "Merge branch 'array_keys_strict_refs' of https://github.com/tony2001/php-src "
...
This reverts commit a6be0f3fd6
.
2015-10-06 23:48:12 +03:00
Dmitry Stogov
524d00e005
Revert "Allow random $this on non-internal Closures again"
...
This reverts commit 35d0405c47
.
2015-10-06 23:48:10 +03:00
Dmitry Stogov
3c0348056a
Revert "Speed up self::method() calls (no ZEND_FETCH_CLASS)"
...
This reverts commit 8c33bdb976
.
2015-10-06 23:48:08 +03:00
Dmitry Stogov
5a49ac77aa
Revert "Speed up self::$property access by 20%"
...
This reverts commit 0fbd3e5fe7
.
2015-10-06 23:48:04 +03:00
Rasmus Lerdorf
fb2c890c2c
zend.assertions is not a boolean
2015-10-06 17:13:38 +09:00
Bob Weinand
0fbd3e5fe7
Speed up self::$property access by 20%
2015-10-05 21:52:09 +02:00
Bob Weinand
8c33bdb976
Speed up self::method() calls (no ZEND_FETCH_CLASS)
2015-10-05 21:16:52 +02:00
Bob Weinand
35d0405c47
Allow random $this on non-internal Closures again
...
As it turns out, there is actually no reason to prevent this, it even was a bigger BC break than expected...
Also fixes a memory leak (the Closure leaks) when calling internal functions via Closure by moving it out of leave helper onto caller side for TOP_CODE:
$z = new SplStack; $z->push(20);
$x = (new ReflectionMethod("SplStack", "pop"))->getClosure($z);
var_dump($x());
2015-10-05 17:49:32 +02:00
Bob Weinand
a6be0f3fd6
Merge branch 'array_keys_strict_refs' of https://github.com/tony2001/php-src
2015-10-05 14:50:04 +02:00
Bob Weinand
881c502520
Improve 517b55362
(scope rebinding on method Closures)
...
Now it is completely impossible to rebind a scoped method Closure (only the kind you get from ReflectionMethod::getClosure()) to a foreign scope
Adding a lot of tests to ensure this...
Also, properly return NULL in case the Closure could not be created instead of some crippled unbound Closure
2015-10-05 00:56:55 +02:00
Xinchen Hui
2fb8bb1157
Fixed bug #70632 (Third one of segfault in gc_remove_from_buffer)
2015-10-03 20:33:24 -07:00
Bob Weinand
517b553625
Fixed bug #70630 (Closure::call/bind() crash with ReflectionFunction->getClosure())
...
This additionally removes support for binding to an unknown (not in parent hierarchy) scope.
Removing support for cross-scope is necessary for certain compile-time assumptions (like class constants) to prevent unexpected results
2015-10-04 01:38:59 +02:00
Bob Weinand
6c61286da4
Do not include zend_verify_return_type in executable ops (phpdbg)
2015-10-02 12:37:39 +02:00
Nikita Popov
8557e8323a
Remove checks for read_property retval being NULL
...
read_property uses &EG(uninitialized_zval) instead.
2015-10-01 16:33:30 +02:00
Nikita Popov
c25e81ab7b
Remove dead assignment in get_property_guard
2015-10-01 16:28:28 +02:00
Dmitry Stogov
64a79817ce
Reordered field to improve data lacality and reduce L1D CPU cache misses in ZEND_INIT_FCALL opcode family
2015-09-30 16:22:56 +03:00
Xinchen Hui
45cb42f49f
Simply use 0/1 instead as dmitry suggested
2015-09-30 10:41:27 +08:00
Xinchen Hui
df2ff75116
Make ZEND_ECHO and removed ZEND_PRINT distinguishable
2015-09-29 21:50:15 +08:00
Dmitry Stogov
ca36b7bc13
Added zend_internal_function.reserved[] fields, to allow extensions keep additional associated information.
...
We didn't have zend_internal_function.reserved[] in PHP5, but we always allocated space for zend_function union, and extensions were able to reuse zend_function.op_array.reserved[] even for internal function. Now this is not possible. And extensions have to use zend_function.op_array.reserved[] for user functions and zend_function.internal_function.reserved[] for internal.
2015-09-29 13:31:47 +03:00
Dmitry Stogov
560e4fa393
Removed or simplified incorrect SEPARATE_*() macros usage.
2015-09-29 11:17:43 +03:00
Dmitry Stogov
7e797f1302
Allow an experimental VM with tail call dispatch technique (disabled by default).
...
This VM may work only if all tail calls are optimized, otherwaise it will crach because of stack overflow.
Unfortunately, we can't guarantee tail call optimization in C.
2015-09-25 12:54:51 +03:00
Dmitry Stogov
a05fc48055
Extended zend_extension API to allow storing additional data associated with op_arrays in opcache SHM. (op_array->reserved[])
2015-09-25 11:50:38 +03:00
Bob Weinand
abf6a0b376
Fix missing LOAD_OPLINE() for ZEND_USER_OPCODE_LEAVE
2015-09-24 21:06:07 +02:00
Bob Weinand
808f62bb4d
Ensure proper exception handling and EX(opline) state in USER_OPCODE handler
2015-09-24 20:33:57 +02:00
Anatol Belski
29bf529d88
fix warning
2015-09-24 16:33:53 +02:00
Dmitry Stogov
62c96059a2
Fixed memory leak.
2015-09-23 23:16:30 +03:00
Bob Weinand
4a174ca7e6
Fixed bug #70532 (respect set_exception_handler in phpdbg)
2015-09-23 17:53:29 +02:00
Joe Watkins
1a5d6acff6
ZEND_COMPILE_GUARDS compiler option
2015-09-23 15:33:57 +02:00
Dmitry Stogov
a6509a6fdd
Fixed test
2015-09-23 13:18:30 +03:00
Xinchen Hui
1e3333e4bd
Fixed Bug #70557 (Memleak on return type verifying failed)
2015-09-23 14:10:23 +08:00
Xinchen Hui
504cd492e1
Fixed bug #70548 (Redundant information printed in case of uncaught engine exception)
2015-09-23 13:04:33 +08:00
Xinchen Hui
a9636ff5a2
Fixed bug #70555 (fun_get_arg() on unsetted vars return UNKNOW)
...
and also keep the indices of func_get_args(). since they are similar
issue of #70574 , thus reuse its test script.
2015-09-23 10:00:20 +08:00
Dmitry Stogov
f9ec5be888
Properly cleanup on wrong ZEND_OVERLOADED_FUNCTION call
2015-09-22 23:51:30 +03:00
Dmitry Stogov
c49d3189b1
Cleanup: removed comments (zend_object.handle and zend_resource.handle are not going to be removed in PHP-7.0)
2015-09-22 15:56:52 +03:00
Dmitry Stogov
04bcce3c15
Cleanup (we keep and reuse size from zend_mm_huge_list)
2015-09-22 15:51:02 +03:00
Dmitry Stogov
c61604b9a9
Fixed reporting about repeatable "huge" memory leaks.
2015-09-22 15:46:41 +03:00
Xinchen Hui
0f3ab1c2d0
Fixed #70547 similar bug in func_get_args
2015-09-22 13:58:42 +08:00
Xinchen Hui
e1dcfd2cf9
Fixed bug #70547 (unsetting function variables corrupts backtrace)
2015-09-22 11:59:35 +08:00
Xinchen Hui
b0e5f9eb6c
Unused var
2015-09-19 19:51:53 -07:00
Xinchen Hui
bb07905a4a
Fixed bug #70528 (assert() with instanceof adds apostrophes around class name)
2015-09-19 19:49:36 -07:00
Bob Weinand
c9988a1e69
Remove superfluous branches
2015-09-20 02:59:30 +02:00
Bob Weinand
95dbe1d03e
Short-circuit zend_parse_parameters_none() so that expensive zpp() call never happens in non-exceptional case
2015-09-20 02:43:22 +02:00
Bob Weinand
14af0f6dcb
Set expectations in generator handling
2015-09-20 02:19:31 +02:00
Bob Weinand
e878dff5d8
Revert accidentally committed closures.c and execute.c
2015-09-19 23:22:07 +02:00
Bob Weinand
08e253cdbc
Optimize zend_mm_small_size_to_bin()
...
It removes a cmov operation and has a much faster branch for small allocations (especially when handling strings) (<= 64 bytes)
2015-09-19 23:07:43 +02:00
Bob Weinand
b8f56013b5
Force compiler to prefer ZEND_CALL_NESTED_FUNCTION
...
It is by far the most used branch; compilers tended here to split the branches via an &2, &1 check, now it only does an &3 check and prefers ZEND_CALL_NESTED_FUNCTION branch
2015-09-19 19:49:44 +02:00
Xinchen Hui
7680194a93
Fixed bug #70481 (Memory leak in auto_global_copy_ctor() in ZTS build)
2015-09-18 17:27:39 +08:00
Xinchen Hui
517c59bfcb
Suppressed warning -Wvolatile-register-var
2015-09-15 08:23:21 -07:00
Dmitry Stogov
927d68db24
Avoid reallocations
2015-09-14 23:04:27 +03:00
Bob Weinand
b0174a14c0
Fixed bug #70478 (**= does no longer work)
...
Reordered ZEND_(ASSIGN_)POW opcodes in zend_vm_def.h so that it won't be missed in future
2015-09-12 00:54:48 +02:00
Dmitry Stogov
51aa1b5a1d
Manual CSE to avoid double read
2015-09-11 14:13:41 +03:00
Xinchen Hui
4ddeeb49a5
Remove free_string_zval
2015-09-11 10:58:24 +08:00
Dmitry Stogov
1b8bf059c4
Don't keep dangling pointer.
2015-09-10 20:03:42 +03:00
Xinchen Hui
66643f6192
Use efree_size
2015-09-10 16:22:07 +08:00
Xinchen Hui
213b49620d
Simplfy zend_is_true
2015-09-10 16:13:22 +08:00
Xinchen Hui
f3e8675d38
Added folder marks
2015-09-10 15:01:28 +08:00
Xinchen Hui
7a0e68b97c
Unexpected
2015-09-10 14:57:22 +08:00
Xinchen Hui
6852f9cd43
cleanup tmp_member handling
2015-09-10 14:39:25 +08:00
Dmitry Stogov
c174e4cd73
Change array sorting implementation to avoid two level callbacks system.
...
Simplify zval comparion API.
2015-09-10 02:51:23 +03:00
Dmitry Stogov
2ea18cd431
Better array_compare improvement
2015-09-09 15:11:03 +03:00
Dmitry Stogov
ac83eaef10
Don't inline "slow" and rarely used functions.
2015-09-09 13:42:35 +03:00
Dmitry Stogov
b1be126788
Avoid useless EG(exception) checks
2015-09-09 11:54:44 +03:00
Xinchen Hui
98bf9156d5
unused var
2015-09-09 15:11:42 +08:00
Dmitry Stogov
c7dffb5673
Don't inline "Undefined variable" warning reporting.
2015-09-09 03:18:52 +03:00
Dmitry Stogov
aa3fd8c849
Fixed typo that might cause serious bugs in MM. May be it was the reason of bug #70392 (SIGSEGV during PHP shutdown).
2015-09-08 17:22:26 +03:00
Dmitry Stogov
bfab74d574
Check EG(exception) only if it's really necessary
2015-09-08 17:20:52 +03:00
Márcio Almada
c08b3922dd
adds missing tokens to list of semi-reserved words and regenerates test suite
2015-09-04 15:02:50 +02:00
Xinchen Hui
d5b78cec64
We should keep one refcount to resource
2015-09-02 22:14:48 -07:00
Xinchen Hui
6815c08e29
Fixed bug #70398 (SIGSEGV, Segmentation fault zend_ast_destroy_ex)
2015-09-02 22:07:29 -07:00
Xinchen Hui
1cfd12d618
Use ZSTR_VAL
2015-09-02 23:36:13 +08:00
Xinchen Hui
362f787b75
Merge branch 'fix-dtrace-phpdbg' of https://github.com/reeze/php-src
2015-09-02 23:28:51 +08:00
Dmitry Stogov
6848cb3f63
Use regular huge pages instead of anonymous if available.
2015-09-02 15:55:41 +03:00
Dmitry Stogov
111bd5d8c4
Introduced additional check. Its miss might be the reason of bug #70392 (SIGSEGV during PHP shutdown)
2015-09-02 13:05:12 +03:00
Stanislav Malyshev
9b1a224d4e
Merge branch 'PHP-5.6'
...
* PHP-5.6: (21 commits)
fix unit tests
update NEWS
add NEWS for fixes
Improve fix for #70172
Fix bug #70312 - HAVAL gives wrong hashes in specific cases
fix test
add test
Fix bug #70366 - use-after-free vulnerability in unserialize() with SplDoublyLinkedList
Fix bug #70365 - use-after-free vulnerability in unserialize() with SplObjectStorage
Fix bug #70172 - Use After Free Vulnerability in unserialize()
Fix bug #70388 - SOAP serialize_function_call() type confusion
Fixed bug #70350 : ZipArchive::extractTo allows for directory traversal when creating directories
Improve fix for #70385
Fix bug #70345 (Multiple vulnerabilities related to PCRE functions)
Fix bug #70385 (Buffer over-read in exif_read_data with TIFF IFD tag byte value of 32 bytes)
Fix bug #70219 (Use after free vulnerability in session deserializer)
Fix bug ##70284 (Use after free vulnerability in unserialize() with GMP)
Fix for bug #69782
Add CVE IDs asigned (post release) to PHP 5.4.43
Add CVE IDs asigned to #69085 (PHP 5.4.39)
...
Conflicts:
ext/exif/exif.c
ext/gmp/gmp.c
ext/pcre/php_pcre.c
ext/session/session.c
ext/session/tests/session_decode_variation3.phpt
ext/soap/soap.c
ext/spl/spl_observer.c
ext/standard/var.c
ext/standard/var_unserializer.c
ext/standard/var_unserializer.re
ext/xsl/xsltprocessor.c
2015-09-02 00:37:20 -07:00
Bob Weinand
50d6fd6a03
Fixed bug #70397 (Segmentation fault when using Closure::call and yield)
2015-09-01 18:04:19 +02:00
Joe Watkins
a8a3b02fd9
fix for --enable-zend-signals and ZTS
...
temporary fix to make queue size bigger in zend_signal while I work on it
2015-09-01 16:51:40 +01:00
Joe Watkins
ccba374faf
Merge branch 'master' of https://github.com/php/php-src
2015-09-01 11:00:45 +01:00
Joe Watkins
85a511d2c1
fix zend signal and tsrm compat
2015-09-01 09:34:54 +01:00
Dmitry Stogov
bb4b50636c
Fixed one more problem related to bug #70187 (Notice: unserialize(): Unexpected end of serialized data)
2015-09-01 10:39:00 +03:00
Dmitry Stogov
66770f9c37
Added missing set of fcc->initialized flag.
2015-09-01 03:15:50 +03:00
Dmitry Stogov
89aa1b7392
Ensure proper data alignment
2015-08-31 13:56:42 +03:00
Dmitry Stogov
37f0c6b5cb
Add myself into list of authors of the most refactored files.
2015-08-31 11:38:16 +03:00
Anatol Belski
d7cd2d7bd6
fix possible overflow
2015-08-29 20:14:07 +02:00
Anatol Belski
0245d6c6a3
use non deprecated symbols
2015-08-29 20:12:31 +02:00
Nikita Popov
ccec609b82
Fix bug #62441
...
These checks were introduced by 8646d9afce
back when name resolution was working differently.
2015-08-28 19:00:05 +02:00
Nikita Popov
7f2261d24a
Fix HT_ASSERT ht->nInternalPointer checks
...
The & was on the wrong side...
2015-08-28 18:59:46 +02:00
Dmitry Stogov
127db5a37d
HANDLE_BLOCK_INTERRUPTIONS() is not used by SAPIs anymore. It may be useful only when PHP configured with --enable-zend-signals.
2015-08-28 16:10:07 +03:00
Dmitry Stogov
87f0f77105
Simplified integer overflow checks
2015-08-28 12:47:21 +03:00
Dmitry Stogov
5d15d2b26d
Removed useless signal protection
2015-08-28 12:39:18 +03:00
Dmitry Stogov
745753eacb
Prevent double load on fast path (manual common subexpression elimination)
2015-08-27 23:02:15 +03:00
Anatol Belski
b795ce6de5
make overflow checks as unexpected
...
it's supposed to mark an error case
2015-08-26 21:12:41 +02:00
Dmitry Stogov
e549ebdb23
Mark parse error functions as cold
2015-08-26 18:29:42 +03:00
Dmitry Stogov
942747cc3e
Removed unused functions
2015-08-26 18:29:23 +03:00
Anatol Belski
95073c8429
fix year in the header
2015-08-26 17:10:23 +02:00
Anatol Belski
d40a149ade
fix typo
2015-08-26 16:39:46 +02:00