Nikita Popov
3ea877ca15
Fix "Call to member function on unknown"
...
Should be "on null".
2016-02-24 17:00:25 +01:00
Dmitry Stogov
25fbb06e2d
Better fix for bug #71622 (Strings used in pass-as-reference cannot be used to invoke C::$callable())
2016-02-18 23:14:46 +03:00
Bob Weinand
3ce6ad9d13
Fixed bug #71622 (Strings used in pass-as-reference cannot be used to invoke C::$callable())
2016-02-18 13:53:15 +01:00
Nikita Popov
9cebdc5d47
Fix yield-by-ref of constant
...
Typo in the condition...
2016-02-11 16:32:45 +01:00
Nikita Popov
1322672c0b
Fix dangling send target when using yield from
...
Also drop some unnecessary TRY_DELREFs -- leftovers from the days
when null was refcounted.
2016-02-11 16:25:16 +01:00
Xinchen Hui
e062759401
Fixed bug #71485 (Return typehint on interanal func causes Fatal error when it throws exception).
2016-01-29 22:05:52 -08:00
Dmitry Stogov
6039d2d914
Fixed bug #71474 (Crash because of VM stack corruption on Magento2).
2016-01-28 11:41:15 +03:00
Xinchen Hui
97a9470d97
bump year which is missed in rev 49493a2
2016-01-02 17:56:11 +08:00
Dmitry Stogov
0402f05ba3
Fixed possible crash on Zend/tests/bug71154.phpt
2015-12-21 15:57:53 +03: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
Dmitry Stogov
9e44b6a61e
Fixed incorrect exception handling
2015-12-17 14:16:19 +03: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
Dmitry Stogov
25c5d185fc
Fixed bug #70997 (When using parentClass:: instead of parent::, static context changed)
2015-11-30 16:52:57 +03:00
Dmitry Stogov
d66d1b97aa
Fixed incorrect order of free/finally on exception
2015-11-10 10:10:39 +03:00
Xinchen Hui
2f2653aa77
Fixed bug #70805 (Segmentation faults whilst running Drupal 8 test suite)
2015-11-03 17:53:56 -08: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
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
a8ae88162f
Fixed bug #70689 (Exception handler does not work as expected)
2015-10-13 17:40:58 +08: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
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
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
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
Xinchen Hui
1e3333e4bd
Fixed Bug #70557 (Memleak on return type verifying failed)
2015-09-23 14:10:23 +08:00
Dmitry Stogov
f9ec5be888
Properly cleanup on wrong ZEND_OVERLOADED_FUNCTION call
2015-09-22 23:51:30 +03: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
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
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
b1be126788
Avoid useless EG(exception) checks
2015-09-09 11:54:44 +03:00
Dmitry Stogov
c7dffb5673
Don't inline "Undefined variable" warning reporting.
2015-09-09 03:18:52 +03:00
Dmitry Stogov
bfab74d574
Check EG(exception) only if it's really necessary
2015-09-08 17:20:52 +03:00
Dmitry Stogov
745753eacb
Prevent double load on fast path (manual common subexpression elimination)
2015-08-27 23:02:15 +03:00
Dmitry Stogov
db5898c9e5
Optimize fast path
2015-08-24 12:47:06 +03:00
Xinchen Hui
f56534e4b9
Fixed Bug #70332 (Wrong behavior while returning reference on object)
...
This fix is actually made for array acessing bug fix (#70262 ) which is
discarded since we have another better fix, anyway now seems this is still useful
2015-08-23 20:17:51 +08:00
Dmitry Stogov
9b1570a378
Removed deprecated comments and added expectations (overloaded properties and array elements are less frequently used than regular ones)
2015-08-19 12:21:14 +03:00
Xinchen Hui
e543769fa4
Fixed bug #70288 (Apache crash related to ZEND_SEND_REF)
2015-08-18 21:45:19 +08:00
Xinchen Hui
8df3461086
Improved fix for bug #70262
2015-08-18 18:07:31 +08:00
Dmitry Stogov
ce89fd9758
Fixed bug #70262 (Accessing array crashes PHP 7.0beta3)
2015-08-17 12:58:14 +03:00
Dmitry Stogov
57a8620761
Set expectations
2015-08-14 10:59:39 +03:00
Dmitry Stogov
715d5d2855
Get rid of implicit type casting in GC_*() macros in Zend/zend_types.h.
...
This prevented compilation warnings and disclosed few incorrect usages in Zend/zend_vm_def.h and ext/dom/xpath.c.
Now explicit type casting may be required on call site.
This may break some C extension code, but it shoulfn't be a problem to add explicit casting.
2015-08-13 13:56:29 +03:00
Dmitry Stogov
fef086d113
Revert "Simplify ZEND_EXIT and count boolean values to it as exit status"
...
This reverts commit 7c003948c6
.
2015-08-12 02:58:21 +03:00
Bob Weinand
7c003948c6
Simplify ZEND_EXIT and count boolean values to it as exit status
2015-08-11 22:36:47 +02:00
Dmitry Stogov
bdada12dae
Reverted useless cleanup code
2015-08-10 23:55:37 +03:00
Bob Weinand
cab75d8b00
Fixed bug #70215 (segfault when __invoke is static)
2015-08-08 16:19:12 +02:00