Nikita Popov
dbe6a23194
Closure::fromCallable(): Getting non-static method statically
...
As this is new functionality, I'm going directly for a TypeError,
rather than a deprecation warning.
2016-07-05 15:52:03 +02:00
Nikita Popov
ceae9fb540
Closure::fromCallable(): Better LSB handling
...
The previous fix missed the "late" part of "late static binding" :)
2016-07-05 15:44:17 +02:00
Nikita Popov
e959a9b652
Closure::fromCallable(): Fix late static binding
2016-07-05 15:31:11 +02:00
Nikita Popov
e395b62c51
Closure::fromCallable(): Use fake closures
2016-07-05 15:13:51 +02:00
Nikita Popov
03fbc27f07
Closure::fromCallable(): Fix test files and names
2016-07-05 15:13:51 +02:00
Nikita Popov
2b46e3c710
Merge branch 'PHP-7.0'
2016-07-05 14:34:20 +02:00
Nikita Popov
8a555d7c66
Merge branch 'PHP-5.6' into PHP-7.0
...
Conflicts:
Zend/zend_compile.c
2016-07-05 14:32:38 +02:00
Pedro Magalhães
08777e9615
Don't enforce LSP if prototype method is private
...
Fixes bug #72496 .
2016-07-05 14:30:22 +02:00
Joe Watkins
f4a6b74667
Merge branch 'pull-request/1906'
2016-07-05 07:57:06 +01:00
Aaron Piotrowski
d9a9cf8eca
Merge branch 'master' into iterable
2016-07-03 22:42:10 -05:00
Xinchen Hui
d1dd474ff9
Fixed bug #72523 (dtrace issue with reflection (failed test))
2016-07-01 18:50:35 +08:00
Nikita Popov
e48ded4bf8
Merge branch 'PHP-7.0'
2016-06-28 21:36:28 +02:00
Nikita Popov
9b8f1d6037
Don't use FUNC_ARG fetches for call_user_func()
...
This makes no sense -- SEND_USER can't even handle INDIRECTs.
2016-06-28 21:34:20 +02:00
Nikita Popov
45cfe7852a
Merge branch 'PHP-7.0'
...
Conflicts:
Zend/zend_vm_def.h
Zend/zend_vm_execute.h
2016-06-28 20:57:55 +02:00
Nikita Popov
fafe01b07b
Make call_user_func() on reference args consistent
...
Previously reference arguments were allowed if call_user_func()
was compiled to SEND_USER and not otherwise. Make it consistent
by always forbidding them.
2016-06-28 20:43:38 +02:00
Xinchen Hui
791d16834c
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Fixed test
2016-06-28 15:39:10 +08:00
Xinchen Hui
76370f30db
Fixed test
2016-06-28 15:39:02 +08:00
Xinchen Hui
3a4b8f6719
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Fixed bug #72508 (strange references after recursive function call and "switch" statement)
2016-06-28 15:36:58 +08:00
Xinchen Hui
ce7e180a04
Fixed bug #72508 (strange references after recursive function call and "switch" statement)
2016-06-28 15:36:50 +08:00
Stanislav Malyshev
7dde353ee7
Merge branch 'PHP-5.5' into PHP-5.6.23
...
* PHP-5.5:
Fixed bug #72446 - Integer Overflow in gdImagePaletteToTrueColor() resulting in heap overflow
update NEWS
fix tests
fix build
Fix bug #72455 : Heap Overflow due to integer overflows
Fix bug #72434 : ZipArchive class Use After Free Vulnerability in PHP's GC algorithm and unserialize
Fixed ##72433: Use After Free Vulnerability in PHP's GC algorithm and unserialize
Fix bug #72407 : NULL Pointer Dereference at _gdScaleVert
Fix bug #72402 : _php_mb_regex_ereg_replace_exec - double free
Fix bug #72298 pass2_no_dither out-of-bounds access
Fixed #72339 Integer Overflow in _gd2GetHeader() resulting in heap overflow
Fix bug #72262 - do not overflow int
Fix bug #72400 and #72403 - prevent signed int overflows for string lengths
Fix bug #72275 : don't allow smart_str to overflow int
Fix bug #72340 : Double Free Courruption in wddx_deserialize
update NEWS
Fix #66387 : Stack overflow with imagefilltoborder
Skip test which is 64bits only
5.5.37 now
Conflicts:
configure.in
ext/mcrypt/mcrypt.c
ext/spl/spl_directory.c
main/php_version.h
2016-06-21 00:01:48 -07:00
Stanislav Malyshev
3f627e580a
Fixed ##72433: Use After Free Vulnerability in PHP's GC algorithm and unserialize
2016-06-20 21:26:33 -07:00
Xinchen Hui
fcd8a5ca65
Fixed bug #72441 (Segmentation fault: RFC list_keys)
2016-06-17 09:34:15 -07:00
Dmitry Stogov
ff363e2e7c
Implemented RFC: Replace "Missing argument" warning with "Too few arguments" exception
...
Squashed commit of the following:
commit 8b45fa2acb
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Jun 16 01:52:50 2016 +0300
Separate slow path of ZEND_RECV into a cold function.
commit 9e18895ee5
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jun 15 23:26:28 2016 +0300
Required argument can't be IS_UNDEF anymore.
commit 662db66e39
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue May 31 17:14:50 2016 +0300
Replace "Missing argument" warning by "Too few arguments" exception.
2016-06-16 02:32:02 +03:00
Dmitry Stogov
a9512af810
Implemented RFC: Fix inconsistent behavior of $this variable
...
Squashed commit of the following:
commit bdd3b6895c
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Jun 16 00:19:42 2016 +0300
Fixed GOTO VM
commit 2f1d7c8b89
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jun 15 21:01:57 2016 +0300
Removed unused variable
commit cf749c42b0
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jun 15 19:06:16 2016 +0300
Protection from $this reassign through mb_parse_str()
commit 59a9a6c83c
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jun 15 18:14:50 2016 +0300
Added type inference rule for FETCH_THIS opcode
commit 73f8d14a85
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jun 15 18:11:18 2016 +0300
Restored PHP-7 behavior of isset($this->foo).
It throws exception if not in object context.
Removed useless opcode handlers.
commit fa0881381e
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue May 31 12:25:47 2016 +0300
Changed "Notice: Undefined variable: this" into "Exception: Using $this when not in object context".
commit e32cc528c0
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue May 24 02:02:43 2016 +0300
Throw exception on attempt to re-assign $this through extract() and parse_str().
commit 41f1531b52
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon May 23 22:18:36 2016 +0300
Fixed inconsistent $this behavior
2016-06-16 02:30:23 +03:00
Xinchen Hui
9c8e1c03b9
Only allow single comma in tail
2016-06-14 14:02:34 +08:00
Xinchen Hui
dcd1c29f79
Fixed bug #72395 (list() regression)
2016-06-13 09:21:14 -07:00
Nikita Popov
792e89385c
Fixed bug #72373
2016-06-10 15:57:18 +02:00
Nikita Popov
766ad0d970
Followup for bug #53432
...
Assign-ops and nested accesses now get the same treatment.
2016-06-08 15:43:58 +02:00
Dmitry Stogov
3610156c5d
This test was fixed together with fix for bug #70228
2016-06-08 11:14:06 +03:00
Dmitry Stogov
10f056255e
Better fix for bug #70228 (memleak if return in finally block)
2016-06-08 02:20:45 +03:00
Dmitry Stogov
2bae4e18a2
Fixed bug #70228 (Memleak if return in finally block)
2016-06-08 00:23:33 +03:00
Dmitry Stogov
421843977f
Fixed bug #71266 (Missing separation of properties HT in foreach etc).
2016-06-07 23:18:52 +03:00
Nikita Popov
543649bd4c
Fix correctness issues with type narrowing
...
Fixes bug #72335 .
2016-06-06 14:56:17 +03:00
Aaron Piotrowski
277d89cde8
Limit covariance to array and Traversable
2016-06-05 22:06:17 -05:00
Nikita Popov
3be92120ba
Fix handling of parse_str() with unpack in optimizer
2016-06-05 22:16:15 +02:00
Nikita Popov
70f0546885
Don't optimize special dynamic calls to non-dynamic
...
As it drops the warning. This is more problematic with constant
propagation, as tests would fail.
Extract a zend_optimizer_classify_function() function, as its now
needed by zend_cfg and update_opN.
2016-06-05 22:04:36 +02:00
Nikita Popov
945a83103d
Fixed bug #53432
...
This change was discussed a while ago in the "negative string
offsets" thread.
2016-06-04 19:20:07 +02:00
Aaron Piotrowski
c2266c382a
Fix generator test; add covariance tests
2016-06-04 10:08:44 -05:00
Nikita Popov
9ba243b6f3
Forbid ?void
2016-06-04 14:53:50 +02:00
Nikita Popov
73b2f79199
More explicit errors for return; vs return null;
...
Both for "return null" in a void function and "return" in
a nullable return function.
2016-06-04 13:27:11 +02:00
Nikita Popov
fe907562ad
Forbid "return;" for typed returns already at compile-time
...
These would otherwise generate a "none returned" error at runtime.
Catch them early.
2016-06-04 13:27:11 +02:00
Aaron Piotrowski
bea9df5281
Add iterable tests
2016-06-03 18:41:03 -05:00
Danack
fc92eeeadf
Added reflection test. Standardised filename for other tests.
2016-06-01 21:53:01 +01:00
Anatol Belski
ce02f0f3b8
fix test
2016-05-31 18:55:39 +02:00
Nikita Popov
921b3251b3
Fix bug #71604
...
Alternatively could throw some kind of uncatchable dummy exception
into the generator. Right now just checking for NULL in two places
seems simpler.
2016-05-28 14:40:32 +02:00
Nikita Popov
79de9fa4aa
Merge branch 'PHP-7.0'
...
Conflicts:
Zend/zend_vm_execute.h
2016-05-28 13:22:49 +02:00
Nikita Popov
4746e5efcb
Forbid "yield from" in force closed generators
...
Same check we do for "yield", was missed when "yield from" was
added. We could make this more granular by only forbidding to
actually yield values and still allow something like "yield from []",
but this does not seem worthwhile.
2016-05-28 13:21:05 +02:00
Xinchen Hui
d29bd582a8
Added NEWS Entry
2016-05-28 16:12:10 +08:00
Lauri Kenttä
58302192b7
Test for bug #72221 , segfault in zend_memnstr_ex
2016-05-28 16:10:29 +08:00
Xinchen Hui
cbe89e2c6e
Merge branch 'fix-72221' of https://github.com/Metabolix/php-src
...
* 'fix-72221' of https://github.com/Metabolix/php-src :
Test for bug #72221 , segfault in zend_memnstr_ex
Fix bug #72221 (segfault, past-the-end access)
2016-05-28 16:09:31 +08:00