Dmitry Stogov
0cdbabe558
Merge branch 'nullable_types' of github.com:morrisonlevi/php-src
...
* 'nullable_types' of github.com:morrisonlevi/php-src:
Fix bug #71428
Add nullable parameter types
Implement nullable return types.
2016-05-23 10:14:26 +03:00
Bob Weinand
4f077aee83
Allow for [] = $array; (alias for list())
2016-05-20 01:51:05 +02:00
Dmitry Stogov
be071702b3
Fixed bug #72188 (Nested try/finally blocks losing return value)
2016-05-13 14:38:43 +03:00
Dmitry Stogov
ccf18da450
Eliminated checks for (func->op_array.fn_flags & ZEND_ACC_GENERATOR) in fast path of DO_FCALL* handlers.
...
This slightly improves calls to regular function and method calls in cost of a bit slower generator initialization.
Separate call frame for generators, allocated on heap, now created by ZEND_GENERATOR_CREATE instruction.
2016-05-13 01:40:15 +03:00
Dmitry Stogov
7b94b958cc
Intern some known (and offten used) strings.
2016-05-12 13:47:22 +03:00
Dmitry Stogov
c19cb70dac
Revert "Refactor zval cleanup into single function"
...
This reverts commit bac6fdb0c5
.
2016-05-06 10:47:58 +03:00
Bob Weinand
bac6fdb0c5
Refactor zval cleanup into single function
...
Also use zval_ptr_dtor_nogc() everywhere in Zend in favor of zval_dtor()
2016-05-05 23:31:57 +02:00
Levi Morrison
9662259cb9
Add nullable parameter types
...
This works off of Dmitry's commit for nullable return types
2016-05-05 11:53:32 -06:00
Dmitry Stogov
49fe737e58
Implement nullable return types.
2016-05-05 09:34:16 -06:00
Nikita Popov
bfef17ab65
Merge branch 'PHP-7.0'
...
Conflicts:
Zend/zend_compile.c
2016-05-04 18:43:55 +02:00
Nikita Popov
9af0c96af4
Fix bug #72159
2016-05-04 18:43:11 +02:00
Joe Watkins
dc78e02ad2
Merge branch 'PHP-7.0'
...
* PHP-7.0:
add compiler option to disable builtins (special case function calls)
2016-05-04 10:54:29 +01:00
Joe Watkins
9bbee305e3
add compiler option to disable builtins (special case function calls)
2016-05-04 10:53:59 +01:00
Pierrick Charron
0aed2cc2a4
Allow catching multiple exception types in a single catch statement
...
This commit add the possibility to catch multiple exception types in
a single catch statement to avoid code duplication.
try {
// Some code...
} catch (ExceptionType1 | ExceptionType2 $e) {
// Code to handle the exception
} catch (\Exception $e) {
// ...
}
2016-05-01 18:47:08 -04:00
Nikita Popov
6a9a0f2090
Merge branch 'PHP-7.0'
2016-05-01 13:05:28 +02:00
Nikita Popov
d0069ca6c1
Fix ('\bar')() in namespace
2016-05-01 13:05:14 +02:00
Dmitry Stogov
2578d08033
Fixed compilation warnings
2016-04-29 14:44:56 +03:00
Nikita Popov
4f54c15cb1
Ct bind private/final $this method call args
...
The test covers two edge-cases wrt opcache support.
2016-04-27 17:10:44 +02:00
Bob Weinand
261eb5cc89
Merge branch 'PHP-7.0'
2016-04-21 21:51:50 +02:00
Bob Weinand
69efeb1223
Fix constant expr coaleasce with protected mode opcache
2016-04-21 21:51:00 +02:00
Bob Weinand
ecf6392243
Merge remote-tracking branch 'origin/PHP-7.0'
2016-04-21 02:50:14 +02:00
Bob Weinand
a287c3f776
Fix magic constants (__LINE__) with ?? for constant scalar exprs
...
Also fix general memory leak when root ast gets replaced in compile time evaluation
2016-04-21 02:45:09 +02:00
Bob Weinand
36202ef056
Merge remote-tracking branch 'origin/PHP-7.0'
2016-04-21 01:26:48 +02:00
Márcio Almada
9f3eab44df
allow null coalescing (??) on constant expressions
2016-04-21 01:22:28 +02:00
Adam Harvey
c4f69b6dfd
Fix ZTS builds by adding a missing TSRMLS_FETCH().
2016-04-20 18:58:29 +02:00
Nikita Popov
c9d8dfed60
Merge branch 'PHP-7.0'
2016-04-20 18:43:43 +02:00
Nikita Popov
77bb96d7c9
Fix bug #71737
...
Also improve the error message for $this used in parameters.
2016-04-20 18:38:40 +02:00
Dmitry Stogov
ffc697ac27
Prevent usage in GC after free.
2016-04-19 01:31:49 +03:00
Nikita Popov
ea1f30057b
Fully initialize DECLARE_CLASS/FUNCTION opcodes
2016-04-18 22:46:45 +02:00
Dmitry Stogov
b73517c1a1
Use DO_FCALL_BY_NAME instead of DO_FCALL, if possible
2016-04-14 16:07:28 +03:00
Dmitry Stogov
3444c1ae24
Use return type hints for type inference and eliminate useless VERIFY_RETRUN_TYPE opcodes.
2016-04-07 17:34:53 +03:00
Joe Watkins
14e4c610e9
Fix #69537 : __debugInfo with empty string for key gives error
2016-04-03 12:40:29 +01:00
Joe Watkins
bff13d90a8
Merge branch 'PHP-7.0'
...
* PHP-7.0:
fix #69537 : __debugInfo with empty string for key gives error
2016-04-03 12:38:53 +01:00
Joe Watkins
91c10662c8
fix #69537 : __debugInfo with empty string for key gives error
2016-04-03 12:38:25 +01:00
Andrea Faulds
1e82ad8038
Warn about invalid strings in arithmetic
...
Squashed commit of the following:
commit e05d3b6732
Author: Andrea Faulds <ajf@ajf.me>
Date: Wed Mar 30 01:43:35 2016 +0100
UPGRADING and NEWS
commit 6caf1d4585
Author: Andrea Faulds <ajf@ajf.me>
Date: Sun Mar 20 21:18:33 2016 +0000
Fixes
commit 6dadb1b0ef
Author: Andrea Faulds <ajf@ajf.me>
Date: Sun Feb 14 02:15:01 2016 +0000
Add test for numeric string errors in assignment
commit bd5f04e8dd
Author: Andrea Faulds <ajf@ajf.me>
Date: Sat Feb 13 23:53:05 2016 +0000
Add test for numeric string errors
commit c72e92f16d
Author: Andrea Faulds <ajf@ajf.me>
Date: Tue Jan 26 23:28:33 2016 +0000
Add test for scientific notation in integer operations
commit d94c08852d
Author: Andrea Faulds <ajf@ajf.me>
Date: Sun Feb 14 01:25:57 2016 +0000
Disable optimiser evaluation for numeric string errors
commit 30ee954ed1
Author: Andrea Faulds <ajf@ajf.me>
Date: Sun Feb 14 01:46:25 2016 +0000
fixup
commit a6403b79e0
Author: Andrea Faulds <ajf@ajf.me>
Date: Sat Feb 13 22:00:27 2016 +0000
Do not convert error-causing numeric strings ahead-of-time
commit f9dc354014
Author: Andrea Faulds <ajf@ajf.me>
Date: Sat Feb 13 19:15:38 2016 +0000
Disable compile-time evaluation for numeric string errors
commit e05b0cc849
Author: Andrea Faulds <ajf@ajf.me>
Date: Fri Feb 5 11:42:26 2016 +0000
Make _zval_get_long_func_noisy function for inlining
commit 84d66321a5
Author: Andrea Faulds <ajf@ajf.me>
Date: Tue Jan 26 23:10:00 2016 +0000
Update tests
commit 5ac4a0cc4b
Author: Andrea Faulds <ajf@ajf.me>
Date: Tue Jan 26 22:08:19 2016 +0000
Use is_numeric_string_ex for zval_get_long etc.
commit c21f088485
Author: Andrea Faulds <ajf@ajf.me>
Date: Thu Jan 7 21:13:04 2016 +0000
Update tests
commit 63e214cf81
Author: Andrea Faulds <ajf@ajf.me>
Date: Wed Jan 6 00:28:01 2016 +0000
Warn on non-/bad numeric strings in arithmetic
2016-03-30 01:44:27 +01:00
Bob Weinand
9600ddbd1a
Merge remote-tracking branch 'origin/PHP-7.0'
2016-03-27 00:57:56 +01:00
Joe Watkins
4327370d13
fix #71414 (Interface method override inherited method and implemented in a trait causes fatal error)
2016-03-26 23:47:31 +00:00
Nikita Popov
b867bd1c8d
Fix FETCH_CLASS_SELF comparisons
...
Turns out those don't form a bitfield.
2016-03-26 22:45:23 +01:00
Nikita Popov
8e5b139732
Evaluate arguments of new for classes without ctor
...
ML: http://markmail.org/message/4b3mk7jid64zvz34
2016-03-25 19:11:37 +01:00
Andrea Faulds
37c8bb5868
Allow specifying keys on list() elements
...
Squashed commit of the following:
commit 0361dbe356
Author: Andrea Faulds <ajf@ajf.me>
Date: Fri Mar 25 16:59:20 2016 +0000
UPGRADING and NEWS
commit dca9d4a36c
Author: Andrea Faulds <ajf@ajf.me>
Date: Fri Mar 25 16:45:18 2016 +0000
Add tests contributed by @jesseschalken
commit e557f77eab
Author: Andrea Faulds <ajf@ajf.me>
Date: Fri Mar 25 16:44:51 2016 +0000
Rebuild VM
commit 70942e4c3c
Author: Andrea Faulds <ajf@ajf.me>
Date: Wed Feb 24 13:12:26 2016 +0000
Add test for evaluation order of nested list() keys
commit ed3592e80c
Author: Andrea Faulds <ajf@ajf.me>
Date: Wed Feb 24 12:42:04 2016 +0000
Add test for evaluation order
commit 589756cbcc
Author: Andrea Faulds <ajf@ajf.me>
Date: Tue Jan 19 17:29:34 2016 +0000
Allow arbitrary expressions for key
commit 3f622077c3
Author: Andrea Faulds <ajf@ajf.me>
Date: Tue Jan 19 17:45:10 2016 +0000
Remove compile-time HANDLE_NUMERIC (see bug #63217 )
commit bab758119a
Author: Andrea Faulds <ajf@ajf.me>
Date: Sun Jan 17 01:20:26 2016 +0000
Handle numeric strings
commit 14bfe93ddc
Author: Andrea Faulds <ajf@ajf.me>
Date: Sun Jan 17 01:09:36 2016 +0000
Allow trailing comma
commit f4c8b2cb30
Author: Andrea Faulds <ajf@ajf.me>
Date: Sat Jan 16 23:47:11 2016 +0000
Add tests
commit 0085884a61
Author: Andrea Faulds <ajf@ajf.me>
Date: Sat Jan 16 22:24:23 2016 +0000
Handle non-integer/string opcodes
commit e572d2d0ad
Author: Andrea Faulds <ajf@ajf.me>
Date: Sat Jan 16 21:10:33 2016 +0000
Disallow mixing keyed and unkeyed list() elements
commit cede13ccfe
Author: Andrea Faulds <ajf@ajf.me>
Date: Sun Jan 10 20:46:44 2016 +0000
list() with keys (no foreach or tests)
2016-03-25 17:18:42 +00:00
Dmitry Stogov
bc49f8b438
Fixed possible memory leak.
2016-03-23 00:46:48 +03:00
Nikita Popov
ac3a66cfad
Merge branch 'PHP-7.0'
2016-03-21 22:50:03 +01:00
Nikita Popov
dc842bbf8d
Fixed bug #71871
2016-03-21 22:49:18 +01:00
Nikita Popov
24f63b1c32
Fix broken merge
2016-03-20 01:35:51 +01:00
Xinchen Hui
93499bfd8a
Fixed test & ZEND_BOOL should result TMP_VAR
2016-03-17 07:55:25 -07:00
Xinchen Hui
f2b6b26189
Merge branch 'PHP-7.0'
...
Conflicts:
Zend/zend_compile.c
2016-03-17 07:51:26 -07:00
Xinchen Hui
910e6dc6b8
Fixed for master
2016-03-17 21:10:08 +08:00
Nikita Popov
64dae1ea76
Statically bind static method call arguments
...
If we know what method will be called, use ct-bound send opcodes.
The intl test is changed because a runtime error changed to a
compile-time error.
2016-03-14 17:50:56 +01:00
Dmitry Stogov
dc33c79a65
Evaluate ord(<string>), chr(<int>) and defined(<persistent-constant>) at compile time
2016-02-19 14:14:27 +03:00
Nikita Popov
d10911afde
Simplify previous fix
...
I didn't notice that there already is a var with the same value.
2016-02-13 23:46:50 +01:00
Nikita Popov
502dd99a6c
Fix ZEND_NEW live ranges
...
While the def starts at DO_FCALL, the variable should still be the
result of NEW, not DO_FCALL.
I had to fix the test for #68652 , because the code started to
(correctly) free the "new self()" object, which triggered an
infinite destructor loop.
2016-02-13 19:04:54 +01:00
Nikita Popov
d1b777bd99
Merge branch 'PHP-7.0'
2016-02-12 17:58:12 +01:00
Nikita Popov
ccc06e252b
Forbid yield from in by-reference generators
...
The current yield from implementation doesn't support by-ref
yields. It's likely not worthwhile to actually implement this,
but we should at least keep the door open for the future by
issuing a compile error.
Refs bug #71252 .
2016-02-12 17:55:29 +01:00
Nikita Popov
44ed1cb5c0
Remove ZEND_CALL_CTOR_RESULT_UNUSED
...
Instead emit a FREE on the result of NEW.
2016-02-11 22:15:11 +01:00
Dmitry Stogov
8c2d55962e
Combine conditions
2016-02-11 23:11:19 +03:00
Nikita Popov
5faedf5b3e
Remove EXT_TYPE_UNUSED in favor of IS_UNUSED
...
This means we no longer allocate an unused VAR for the retval of
instructions that support unused results.
Nearly all instructions already used the result variable only if
it was used. The only exception to this was the return value
variable for internal function call results. I've adjusted the code
to use a stack zval for the unused return case now. As we have
retval specialization now, we know that it doesn't matter.
2016-02-11 18:02:19 +01:00
Nikita Popov
abc06b91cd
Merge branch 'PHP-7.0'
...
Conflicts:
Zend/zend_compile.c
2016-02-06 16:43:54 +01:00
Nikita Popov
9f82f21d01
Fix bug #71529
2016-02-06 16:43:28 +01:00
Nikita Popov
35662c9bd3
Forbid double use() and use() of param
...
Also commit a test I forgot to add for forbidden use() of
auto-globals.
2016-01-12 15:37:39 +01:00
Dmitry Stogov
6579e48417
Introduced BIND_STATIC opcode instead of FETCH_R/FETCH_W(static)+ASSIGN/ASSIGN_REF (similar to BIND_GLOBAL).
...
In the future we may refer to static variable by index instead of name, to eliminate hash lookup.
2016-01-12 12:20:35 +03:00
Xinchen Hui
9c2dde98db
Merge branch 'PHP-7.0'
2016-01-07 07:05:31 -08:00
Xinchen Hui
16a2b47394
Fixed bug #71300 (Segfault in zend_fetch_string_offset)
2016-01-07 07:05:17 -08:00
Xinchen Hui
563659822d
Merge branch 'PHP-7.0'
2016-01-02 17:56:54 +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
Derick Rethans
5362f0ad7f
MFH: Fix lineno for finally FAST_CALL and JMP
2015-12-31 09:46:43 +00:00
Nikita Popov
b3afeeabef
Fix lineno for finally FAST_CALL and JMP
2015-12-30 23:49:07 +01:00
Nikita Popov
65e456f364
Introduce BIND_LEXICAL
...
This opcodes inserts a local CV into the closure static variable
table. This replaces the previous mechanism of having static
variables marked as LEXICAL, which perform a symtable lookup
during copying.
This means a) functions which contain closures no longer have to
rebuild their symtable (better performance) and b) we can now track
used variables in SSA.
2015-12-29 23:14:53 +01:00
Nikita Popov
4440436821
Forbid use() of auto-globals
...
We don't correctly support it, it doesn't make sense and it's also
forbidden for parameters.
2015-12-29 11:20:44 +01:00
Julien Pauli
7a2f60d3c7
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Remove mentions of "type hint" and "typehint"
2015-12-24 15:19:54 +01:00
Levi Morrison
2a7eeff33e
Remove mentions of "type hint" and "typehint"
2015-12-24 15:19:31 +01:00
Dmitry Stogov
aa4a83fec7
Fixed bug #71196 (Memory leak with out-of-order live ranges)
2015-12-23 01:47:38 +03:00
Nikita Popov
88eae43ff9
Remove uses of VARs in extended_value
...
The DECLARE_(ANON_)INHERITED_CLASS(_DELAYED) opcodes were
referencing the parent ce VAR through extended_value. This is
hacky and we can't track the def-use chain in SSA.
To avoid this, the layout of declaration opcodes is changed
as follows: op1 points to the lcname and rtd_key literals, in
that order. (For anon/lambda declarations only one of lcname or
rtd_key is present.) This frees up op2, which is now used to
reference the parent ce VAR in inheriting declarations. The
jmp offset for anon class declarations is moved frop op2 to
extended_value.
The changes were applied both to class and function declarations
to keep everything symmetric.
2015-12-21 14:44:42 +01:00
Andrea Faulds
5d0dfda60c
Merge branch 'PHP-7.0'
2015-12-19 02:35:19 +00: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
8d355bff85
Merge branch 'PHP-7.0'
2015-12-17 22:40:55 +00:00
Andrea Faulds
a4648ded43
Fix bug #52355
2015-12-17 22:39:29 +00:00
Nikita Popov
56f1106162
Use FETCH_CLASS_EXCEPTION for instanceof
...
This does not collide with NO_AUTOLOAD -- missing classes will be
silenced, but invalid use of self etc will result in an exception
instead of a fatal error.
2015-12-14 17:50:20 +01:00
Nikita Popov
0919178963
Add result op for ASSERT_CHECK to fix SSA
...
Otherwise one source of the phi node at the join point will be
borked.
I'm marking the ASSERT_CHECK result as unused in pass2, which is
a bit ugly.
2015-12-14 12:31:00 +01:00
Xinchen Hui
0d8f5a43d3
Merge branch 'PHP-7.0'
...
Conflicts:
NEWS
2015-12-11 09:13:26 -08:00
Xinchen Hui
778e5f3da5
Fixed bug #71092 (Segmentation fault with return type hinting)
2015-12-11 09:11:28 -08:00
Nikita Popov
591fe26d5d
Remove BP_VAR_REF
...
The distinction between BP_VAR_REF and BP_VAR_W is no longer
revelant, since we dropped support for =& new.
2015-12-11 15:56:52 +01:00
Nikita Popov
04e3d82b55
Make duplicate class constant error for internal class
...
And drop two duplicate constant declarations from intl. These
were leaking previously.
2015-12-10 22:22:49 +01:00
Nikita Popov
8e5e3301a1
Make ZEND_CLONE return a TMP_VAR
...
As the return value can't be reference and it's unlikely to be
unused.
Also remove some unnecessary checks for ce==NULL. A ce is required
nowadays.
2015-12-10 22:16:25 +01:00
Nikita Popov
f1278edefc
Drop two compiler TODOs
...
Call-time pass by reference is now a parse error.
There is no benefit in dropping implementing_class currently.
2015-12-10 19:04:59 +01:00
Nikita Popov
c8a64e289c
Reintroduce use of FETCH_GLOBAL_LOCK
...
Just found this old AST todo...
It no longer makes sense as an optimization due to the introduction
of BIND_GLOBAL, however it ensures that the global variable name is
not evaluated twice, which is presumably something we wish to
guarantee.
2015-12-10 19:04:59 +01:00
Nikita Popov
3fa86105f7
Remove FETCH_STATIC_MEMBER flag
2015-12-10 18:25:29 +01:00
Nikita Popov
3d4a2d2002
Merge branch 'PHP-7.0'
...
Conflicts:
Zend/zend_vm_def.h
Zend/zend_vm_execute.h
2015-12-10 18:24:29 +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
Dmitry Stogov
5ee7b7d01a
Don't create live-range across NOPs and some other instructions
2015-12-09 05:15:58 +03:00
Dmitry Stogov
c1803bf652
Avoid construction of empty live-ranges because of OP_DATA instruction
2015-12-08 18:10:07 +03:00
Dmitry Stogov
a75c195000
Implemented the RFC Support Class Constant Visibility
.
...
Squashed commit of the following:
commit f11ca0e7a5
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Dec 8 12:38:42 2015 +0300
Fixed test expectation
commit 211f873f54
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Dec 8 12:28:38 2015 +0300
Embed zend_class_constant.flags into zend_class_constants.value.u2.access_flags
commit 51deab84b2
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Dec 7 11:18:55 2015 +0300
Fixed issues found by Nikita
commit 544dbd5b47
Author: Dmitry Stogov <dmitry@zend.com>
Date: Sat Dec 5 02:41:05 2015 +0300
Refactored immplementation of https://wiki.php.net/rfc/class_const_visibility
@reeze created an RFC here and I emailed internals here and didn't get any responses positive/negative.
2015-12-08 12:40:42 +03:00
Xinchen Hui
5c707a6cf8
Merge branch 'PHP-7.0'
2015-11-28 23:44:06 -08:00
Xinchen Hui
1f65006fce
Fixed bug #70931 (Two errors messages are in conflict)
2015-11-28 23:43:41 -08:00
Nikita Popov
95283a0504
Merge branch 'PHP-7.0'
2015-11-26 16:57:11 +01:00
Nikita Popov
99dd7ee80b
Forbid namespace\int type hint as well
2015-11-26 16:56:08 +01:00
Xinchen Hui
06bcaf98c5
Merge branch 'PHP-7.0'
2015-11-25 19:11: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
Xinchen Hui
c6b08e99fe
Merge branch 'PHP-7.0'
2015-11-25 11:41:01 +08: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
569763cb1a
Fix scalar type names with leading backslash
2015-11-24 21:39:06 +01:00
Xinchen Hui
42252f409b
Merge branch 'PHP-7.0'
2015-11-23 18:33:21 +08:00
Xinchen Hui
51ccc88b87
Port fix to 7.0
2015-11-23 18:31:56 +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
ab17840d33
Fixed bug #70957 (self::class can not be resolved with reflection for abstract class)
2015-11-23 12:20:44 +08:00
Dmitry Stogov
84610b1f39
Don't keep wrong jump target in last CATCH.
2015-11-19 00:47:08 +03:00
Andrea Faulds
366ba41334
Add void return type
2015-11-18 17:30:49 +00:00
Xinchen Hui
36d25a287b
Merge branch 'PHP-7.0'
2015-11-13 21:25:06 +08:00
Xinchen Hui
25de928df7
Fixed bug #70912 (Null ptr dereference instantiating class with invalid array property)
2015-11-13 21:24:42 +08:00
Dmitry Stogov
3a5fa926bf
Squashed commit of the following:
...
commit afe963e6cc289696e60c6c679796ba2197c52b3b
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Nov 13 15:32:29 2015 +0300
Added news entry
commit a126b891c97848dd7ef8f1abf716328c46e0f19c
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Nov 13 15:29:21 2015 +0300
VERIFY_RETURN_TYPE doesn't have to cleanup operand on exception, bacause now, live temporary variables are released by exception unwinder.
commit 0db475e98786e6bcaa8401ee3e0b33743b9a2f2b
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Nov 12 22:55:39 2015 +0300
Fixed copy/paste
commit 0ac73fe7174bec9de9a610319a98b259bea67f7f
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Nov 11 16:11:50 2015 +0300
Fixed bug #62210 (Exceptions can leak temporary variables)
2015-11-13 15:35:07 +03:00
Dmitry Stogov
998204ef2d
Separate common part of compile_file() and compile_string() into zend_compile()
2015-11-12 16:59:44 +03:00
Dmitry Stogov
948b7f5421
Changed ZEND_FREE.op2.num and ZEND_FE_FREE.op2.num back to use live_range_offset (try_catch_offset does't work)
2015-11-11 11:12:44 +03:00
Dmitry Stogov
baf97b1fcc
We don't nees zend_op_array->brk_cont_array at run-time anymore.
...
Move zend_op_array->brk_cont_array into CG(context).brk_cont_array.
Use more compact zend_op_array->live_range instead of zend_op_array->brk_cont_array.
Semantic is kept unchanged.
2015-11-10 21:48:03 +03:00
Dmitry Stogov
71092b7c2b
Make FE_FETCH and following assignments to be a part of a loop.
2015-11-10 20:11:05 +03:00
Dmitry Stogov
86a96f2cf1
Changed meaning of "op2" for ZEND_FREE, ZEND_FE_FREE, ZEND_FAST_CALL, ZEND_FAST_RET.
...
Previously it was an instruction number.
Now it's an index in op_array->try_cacth_array[].
2015-11-10 19:13:54 +03:00
Andrea Faulds
7bc6361294
Merge branch 'PHP-7.0'
2015-11-09 23:42:12 +00:00
Andrea Faulds
dae37661d9
Use ZEND_STRL macro for builtin_types
2015-11-09 11:15:58 +00: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
b009f84ec0
Removed incorrect "return" statement
2015-10-28 21:26:52 +03:00
Dmitry Stogov
eb7be5379d
Speed up fetching of class entries for self:: parent:: and static::
...
This is generalized solution for Bob's idea of speed up self::method() calls without ZEND_FETCH_CLASS.
At first, it adds few new opcodes to separate class related behaviour:
FETCH_STATIC_PROP_R
FETCH_STATIC_PROP_W
FETCH_STATIC_PROP_RW
FETCH_STATIC_PROP_FUNC_ARG
FETCH_STATIC_PROP_UNSET
FETCH_STATIC_PROP_IS
UNSET_STATIC_PROP
ISSET_ISEMPTY_STATIC_PROP
FETCH_CLASS_CONSTANT
At seconds, it enables IS_UNUSED operand to fetch (self, parent or static without separate FETCH_CLASS) for new opcodes and the following ones:
INIT_STATIC_METHOD_CALL
NEW
END_INSTANCEOF
Finaly, opcache optimizer had to be fixed to support new opcodes.
2015-10-28 21:26:52 +03:00
Nikita Popov
36cd300693
Merge branch 'PHP-7.0'
2015-10-24 23:19:36 +02:00
Nikita Popov
b9cc3176eb
Fix bug #70782
2015-10-24 23:19:02 +02:00
Levi Morrison
43a4336820
Refactor zend_mark_function_as_generator
2015-10-19 06:57:21 -07:00
Márcio Almada
ddb6d7801e
Fix bug #70650
2015-10-07 16:25:59 +02: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
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
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
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
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
Anatol Belski
29bf529d88
fix warning
2015-09-24 16:33:53 +02:00
Joe Watkins
1a5d6acff6
ZEND_COMPILE_GUARDS compiler option
2015-09-23 15:33:57 +02:00
Xinchen Hui
4ddeeb49a5
Remove free_string_zval
2015-09-11 10:58:24 +08:00
Joe Watkins
784dd715e4
Fix mangled property names on anon classes
2015-08-18 16:37:38 +01:00
Bob Weinand
34834c58fa
Fixed bug #70293 (Crash with specific assertions and zend.assertions=-1)
2015-08-18 15:01:24 +02:00
Xinchen Hui
121409865b
use efree_size here
2015-08-12 11:15:09 +08:00
Bob Weinand
dbd8edbbd0
Fixed bug #70241 (Skipped assertions affect Generator returns)
2015-08-11 22:12:06 +02:00
Steven Hilder
7ecb761818
Allow property names from anonymous classes to be unmangled
2015-08-06 15:18:14 +00:00
Dmitry Stogov
58596897e9
Get rid of ZEND_FAST_CALL_UNBOUND
2015-08-04 08:35:40 +03:00
Dmitry Stogov
a16aa4c42c
Move most "finally" related code-generation from pass_two() to compiler.
2015-08-04 07:42:28 +03:00
Nikita Popov
743801054d
Try to fix finally issue
2015-08-04 07:42:28 +03:00
Hugh Davenport
2a1a8f9ea7
Fixed bug #70183 null pointer deref (segfault) in zend_eval_const_expr
2015-08-02 16:51:23 +02:00
Bob Weinand
ac87657d42
Implicit return should be always on the last line of a function
2015-07-31 02:44:42 +02:00
Bob Weinand
d45d5271f7
Fix bug #70164 (__COMPILER_HALT_OFFSET__ under namespace is not defined)
2015-07-29 19:18:29 +02:00
Julien Pauli
a28115ccdb
Fix for #70159 - Better magic constants substitution
2015-07-28 16:30:08 +02:00
Bob Weinand
33a91f57e9
Set CG(zend_lineno) to beginning for final class errors/ops
2015-07-28 00:57:49 +02:00
Bob Weinand
7ca85d8875
Fully fix typed generator returns
2015-07-24 22:04:05 +02:00
Nikita Popov
cff6cbc01f
Emit EXT_STMT for each statement
...
I'm excluding unticked statements for this (in 5.x they were included)
as this would just result in two consecutive EXT_STMTs.
Also add all class statements to unticked statements, these would
generate superfluous EXT_STMT/TICKS in the parent op_array.
2015-07-22 13:38:42 +02:00
Bob Weinand
2141ab9be5
Fix bug #70106 (Inheritance by anonymous class)
2015-07-21 20:34:06 +02:00
Bob Weinand
81a2c43d5e
Add an option to not generate INIT_FCALL ops for user functions too
2015-07-21 16:39:49 +02:00
Nikita Popov
c568ffe517
Ignore getcwd return in zend_compile
...
To do this move the php_ignore_value macro to ZEND_IGNORE_VALUE.
2015-07-16 22:48:56 +02:00
Xinchen Hui
4064ee3061
Fixed bug #70240 (Segfault when doing unset($var());)
2015-08-11 21:42:11 +08:00
Xinchen Hui
87a5f2c486
Fixed no return statement in function returning non-void
2015-08-10 21:48:17 +08:00
Bob Weinand
1003d01f3a
Fix __METHOD__ in functions nested into methods
2015-07-14 02:37:35 +02:00
Xinchen Hui
e63c756c09
Better implementation
2015-07-11 18:59:09 +08:00
Bob Weinand
0584df0ad9
hmm, we do not need the nop after compilation, so does not matter for opcache...
2015-07-10 23:35:05 +02:00
Bob Weinand
56800e470b
a: try { ... } ≠ try { a: ... }
2015-07-10 23:29:07 +02:00
Dmitry Stogov
ef1b588f6a
Resolve GOTO at compile time and replace it with sequnce of FREE/FE_FREE and JMP.
2015-07-10 04:44:21 +03:00
Dmitry Stogov
44f7348caa
Exception thrown by "return" statement (from TMP destructors) shouldn't be caught in the same function
2015-07-10 04:13:34 +03:00
Dmitry Stogov
549e8c4959
Squashed commit of the following:
...
commit 03cf871f1576f08b2348c141b209894a7bf17a86
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:31 2015 +0300
Revert "Fixed bug #62210 (Exceptions can leak temporary variables. As a part of the fix serious refactoring was done. op_array->brk_cont_array was removed, and replaced with more general and speed efficient op_array->T_liveliness. ZEND_GOTO opcode is always replaced by ZEND_JMP at compile time). (Bob, Dmitry, Laruence)"
This reverts commit 5ee8413259
.
commit 285a68227ce3d380e821a24fa389aa5239bd3fe1
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:26 2015 +0300
Revert "Tuned off dubugging of live ranges"
This reverts commit 404dc93d35
.
commit 93d9d11157301ee2ec99afb6f5744b126d17f637
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:17 2015 +0300
Revert "Remove loop_var_stack"
This reverts commit b3a4c05071
.
commit ede68ebbc284aec79e3f719f2c8dbf9da6907752
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:12 2015 +0300
Revert "ZEND_SEPARATE reuses temporaries"
This reverts commit 1852f538b9
.
commit 96d8995dc1f517fb01b481736273767509f76c47
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:10 2015 +0300
Revert "Add assertion in liveliness computation"
This reverts commit ed14019e8c
.
commit 0649d7bfef152e6cc8e67b922534e9946c634d9c
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:07 2015 +0300
Revert "Fixed invalid live-range detection"
This reverts commit 54f367ee2a
.
commit dfe8f3851f6b04595eb089323e3492115a59363e
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:04 2015 +0300
Revert "Add test guaranteeing that loop vars are only freed after potential return type exceptions"
This reverts commit f5db5a558d
.
commit 52a94aad6f48a199358cc07f7e4f56bb73050504
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:45:01 2015 +0300
Revert "Fixed exception habdling on "return" statement."
This reverts commit 17c5315bdf
.
commit 6e90ad7331901711e89c2ceb2bcab5023e5cee60
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:44:58 2015 +0300
Revert "Fix too early terminated temporary range with break/cont/goto"
This reverts commit cc876c04b4
.
commit 7b766e44b1970e4031f75109c302c07ead2c05cb
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 10 02:44:55 2015 +0300
Revert "Fixed exception catching on break/continue"
This reverts commit 8c3f701eeb
.
2015-07-10 03:31:52 +03:00
Nikita Popov
a49ce7bb91
Don't return T_ERROR from token_get_all()
...
This turned out to be rather inconvenient after all. Instead just
return the same output we did on PHP 5. If people want to have an
error, use TOKEN_PARSE.
2015-07-09 23:02:21 +02:00
Dmitry Stogov
8c3f701eeb
Fixed exception catching on break/continue
...
Fixed "finaly" handling on exception in "return" statement
2015-07-09 23:20:50 +03:00
Bob Weinand
cc876c04b4
Fix too early terminated temporary range with break/cont/goto
...
I have no crashing or leaking reproduce script, only valgrind invalid reads for that one; hence no phpt here
2015-07-09 20:07:57 +02:00
Dmitry Stogov
54f367ee2a
Fixed invalid live-range detection
2015-07-09 17:38:29 +03:00
Dmitry Stogov
301ee26568
Fixed situation, when CHECH_EXCEPTION() might change value of "opline" variable and the following "opline" useages would access elements of different opcode. That might lead to unpredictable behavior. (Only PHP-7 with GCC global register variables was affected).
...
CHECK_EXCEPTION() macro is removed. ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTIO() should be used instead. It's equivalent to old CHECK_EXCEPTION() + ZEND_VM_NEXT_OPCODE().
As a side effect, this also slightly improved performnce of builds with GCC >= 4.8.
2015-07-08 18:33:58 +03:00
Nikita Popov
b3a4c05071
Remove loop_var_stack
...
Instead add a loop_var member to brk_cont_element. Now that
brk_cont is compile-time the distinction is no longer necessary.
Also drops brk_cont.start, check the loop_var op_type instead.
2015-07-07 20:55:12 +02:00
Anatol Belski
c0142de470
fix C89 compat
2015-07-07 18:39:33 +02:00
Kalle Sommer Nielsen
fe842a8510
fix C89 compat
2015-07-07 18:26:14 +02:00
Julien Pauli
dfb0c6363f
Merge branch 'PHP-5.6'
...
* PHP-5.6:
Fixed double ZEND_TICKS opcode generation for declare()
Conflicts:
Zend/zend_compile.c
2015-07-07 15:03:58 +02:00
Julien Pauli
c22da81b71
Fixed double ZEND_TICKS opcode generation for declare()
2015-07-07 14:56:05 +02:00
Dmitry Stogov
5ee8413259
Fixed bug #62210 (Exceptions can leak temporary variables. As a part of the fix serious refactoring was done. op_array->brk_cont_array was removed, and replaced with more general and speed efficient op_array->T_liveliness. ZEND_GOTO opcode is always replaced by ZEND_JMP at compile time). (Bob, Dmitry, Laruence)
...
Squashed commit of the following:
commit 38e22106d4
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 15:12:19 2015 +0300
Added NEWS entry
commit 0a355935bf
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 15:06:32 2015 +0300
Inline function, to eliminate repeatable checks
commit d937584f3a
Merge: 0341626
32677f5
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 14:35:49 2015 +0300
Merge branch 'master' into temporary_cleaning
* master:
Fixed bug #70006 (cli - function with default arg = STDOUT crash output).
Fix x86 build
Fixed use after free on closure_call_leak_with_exception.phpt
Fixed test
commit 0341626ea9
Merge: 74869fa
dec35de
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 12:00:53 2015 +0300
Merge branch 'temporary_cleaning' of https://github.com/laruence/php-src into temporary_cleaning
* 'temporary_cleaning' of https://github.com/laruence/php-src :
Fixed checkpoint get
Fixed crash of invalid pointer derefer
cleanup
commit 74869fa673
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 11:45:34 2015 +0300
Fixed wrong GOTO resolution
commit dec35ded32
Author: Xinchen Hui <laruence@gmail.com>
Date: Tue Jul 7 15:58:49 2015 +0800
Fixed checkpoint get
commit b0f419540a
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 10:47:11 2015 +0300
Fixed crash of invalid pointer derefer (laruence)
commit 7a428d98ca
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 10:35:47 2015 +0300
Fixed identation
commit 9c3a4dce9c
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 10:33:52 2015 +0300
Fixed invalid size
commit 653abc670b
Author: Xinchen Hui <laruence@gmail.com>
Date: Tue Jul 7 11:29:14 2015 +0800
Fixed crash of invalid pointer derefer
commit e04500ceda
Author: Xinchen Hui <laruence@gmail.com>
Date: Tue Jul 7 11:28:26 2015 +0800
cleanup
commit 34183e1687
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 04:49:46 2015 +0300
op_array->T_liveliness compression
commit 2f6ad84579
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 04:44:44 2015 +0300
White spaces
commit be83f115a3
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 04:42:26 2015 +0300
Identation
commit 1f5084b990
Merge: 91b620d
1adf3df
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 04:41:54 2015 +0300
Merge branch 'master' into temporary_cleaning
* master:
Throw TypeError for invalid callback
Fix crash when exception occurs during nested rope
Fix crash when exception is thrown during ROPE_END
Small cleanup in ternary compilation
move the define to the right place
fix ext/ldap build
Rectify information about invalid shift warning being now ArithmeticError
commit 91b620d684
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 04:32:04 2015 +0300
Replace GOTO by FREE/FE_FREE and JMP at compile time
commit 7052e56979
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Jul 7 02:25:08 2015 +0300
Use zend_regenerate_var_liveliness_info() to regenerate information after pass two.
commit ae72b0dc67
Merge: a81c4bb
a919fe8
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Jul 6 21:02:34 2015 +0300
Merge branch 'master' into temporary_cleaning
* master:
Do not display EXT_TYPE_UNUSED in phpdbg opcodes
Run debug build with opcache on travis
commit a81c4bb8c6
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Jul 6 20:59:34 2015 +0300
Improved algorithm. It's actually the same algorithm with second loop removed and simpler temporary data structures. The only difference may be in "re-defined" vatriable handling. Now live-range in that case started from the seconnd definition (this must be more safe).
commit 9a16810f7a
Merge: bbfbe47
001ecd3
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Jul 6 17:57:45 2015 +0300
Merge branch 'master' into temporary_cleaning
* master:
Simplify TMP var number decoding (without HashTable)
commit bbfbe470c8
Merge: 0bda4ab
436b01e
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Jul 6 17:02:01 2015 +0300
Merge branch 'master' into temporary_cleaning
* master:
Avoid dangerous optimization
Fixed JMPZNZ instruction printing
Attempt at falling back on ldap_find_control for Mac OS
commit 0bda4abea7
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Jul 6 16:05:33 2015 +0300
Fixed live-range construction for OP_DATA opcode
Added comments about algorithm assumtions
commit 521ad9df98
Merge: 4398dab
a09dcb0
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Mon Jul 6 14:54:15 2015 +0200
Merge branch 'master' of https://github.com/php/php-src into temporary_cleaning
commit 4398dab82f
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Mon Jul 6 13:51:27 2015 +0200
Add a few phpt tests related to temporary cleaning
commit 739656f83f
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Jul 6 14:28:49 2015 +0300
Fixed Zend/tests/foreach_004.phpt failure (FE_FETCH shouldn't be included into TMP vatriablr live range)
commit 3df462a2bc
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Jul 6 13:41:02 2015 +0300
Improve data layout (reduce the op_array structure size on 64-bit systems)
commit 883b73c56e
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Jul 6 13:28:45 2015 +0300
Removed op_array->brk_cont_array
commit ae5e58b598
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Mon Jul 6 04:22:58 2015 +0200
Fix bug with brk_cont variable free / free loop vars via temporary liveliness info
commit b4223ca627
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Mon Jul 6 04:07:07 2015 +0200
Fix bugs / cleanup fixes
commit ea33189d22
Author: Xinchen Hui <laruence@gmail.com>
Date: Sun Jul 5 20:58:38 2015 +0800
Removed useless TsTop
commit 1dbb007e4a
Merge: 550bbf8
3a8af24
Author: Xinchen Hui <laruence@gmail.com>
Date: Sat Jul 4 15:06:44 2015 +0800
Merge branch 'temporary_cleaning' of https://github.com/dstogov/php-src into temporary_cleaning
commit 3a8af24529
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 3 16:15:36 2015 +0300
More exceptions from regular liveliness analyses (with explanation in comments).
Mark old "unexplained" exceptions with ???.
commit ba721efa2c
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 3 14:16:09 2015 +0300
Print list of live temp variables (at least for internal debugging)
commit 8d1f88fe91
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 3 13:31:56 2015 +0300
Use op_array->T_liveliness to free incomplete ropes and restore error_reporting level on exception
commit 80c1d0d779
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jul 3 11:05:39 2015 +0300
Don't keep empty T_liveliness
commit 501ae8aaac
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Jul 2 22:31:48 2015 +0300
Reverted changes to Zend/zend_arena.h.
Reuse CG(arena) instead of creating a new one.
commit a4fce36907
Merge: 6ff7246
fd0fcce
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Jul 2 22:01:42 2015 +0300
Merge branch 'temporary_cleaning' of github.com:bwoebi/php-src into temporary_cleaning
* 'temporary_cleaning' of github.com:bwoebi/php-src:
Fix remaining issues with compacted temporaries
Fix regression from last commit (+1 ?!)
Fix off-by-one (opcache may remove last ZEND_RETURN)
Speed algorithm up, more fail safety when reusing temporaries
Dumb bug in opcode.c (forgot to update Ts[i])
Fix opcache support
Exempt ROPE temporaries from freeing
Hmm, we need temporary info for all the opcodes
Add opcache support for cleaning in optimization step (Opcache seems to have a few unrelated issues which blow up together with that patch)
Add proper temporary cleaning upon frame abortion
Fix arena on small sizes (size < sizeof(zend_arena))
commit fd0fcce811
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Thu Jul 2 20:00:33 2015 +0200
Fix remaining issues with compacted temporaries
commit 427dc58bbb
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Wed Jul 1 22:49:12 2015 +0200
Fix regression from last commit (+1 ?!)
commit 1adcf56a6e
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Wed Jul 1 22:17:07 2015 +0200
Fix off-by-one (opcache may remove last ZEND_RETURN)
commit 25b231b784
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Wed Jul 1 20:59:24 2015 +0200
Speed algorithm up, more fail safety when reusing temporaries
commit 22d9d05350
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Wed Jul 1 16:48:46 2015 +0200
Dumb bug in opcode.c (forgot to update Ts[i])
commit 6538269bfa
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Wed Jul 1 13:05:52 2015 +0200
Fix opcache support
commit 333a7c4a88
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Sat Jun 27 22:40:21 2015 +0200
Exempt ROPE temporaries from freeing
commit 02585f7708
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Fri Jun 26 16:20:55 2015 +0200
Hmm, we need temporary info for all the opcodes
commit cbcaedbd78
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Fri Jun 26 01:04:09 2015 +0200
Add opcache support for cleaning in optimization step
(Opcache seems to have a few unrelated issues which blow up together with that patch)
commit fef649f406
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Fri Jun 26 01:02:27 2015 +0200
Add proper temporary cleaning upon frame abortion
commit 1cec2e7271
Author: Bob Weinand <bobwei9@hotmail.com>
Date: Thu Jun 25 23:33:21 2015 +0200
Fix arena on small sizes (size < sizeof(zend_arena))
2015-07-07 15:41:12 +03:00
Nikita Popov
f3498783df
Small cleanup in ternary compilation
2015-07-06 20:15:45 +02:00
Anatol Belski
a97f764472
bring back the division by zero warning
2015-07-05 20:18:17 +02:00
Bob Weinand
56b6e0dd14
Fix use after free with opcache (interned strings)
2015-07-05 02:00:52 +02:00
Kalle Sommer Nielsen
ce2cd89258
Replace references to PHP_WIN32 and TSRM_WIN32 with ZEND_WIN32 in Zend/, this also fixes 1 instance of where fflush(stderr) was misplaced (zend_extensions.c)
2015-07-04 18:55:22 +02:00
Aaron Piotrowski
68baa539dc
Allow integer default for float type
2015-07-02 18:07:24 -05:00
Bob Weinand
06fcf94c45
CT eval ZEND_DIV in all cases (warning was removed)
2015-07-02 02:20:58 +02:00
Dmitry Stogov
7aa7627172
Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes).
2015-06-30 13:59:27 +03:00
Dmitry Stogov
4bd22cf1c1
Improved zend_string API (Francois Laupretre)
...
Squashed commit of the following:
commit d96eab8d79
Author: Francois Laupretre <francois@tekwire.net>
Date: Fri Jun 26 01:23:31 2015 +0200
Use the new 'ZSTR' macros in the rest of the code.
Does not change anything to the generated code (thanks to compat macros) but cleaner.
commit b352643910
Author: Francois Laupretre <francois@tekwire.net>
Date: Thu Jun 25 13:45:06 2015 +0200
Improve zend_string API
Add missing methods
2015-06-29 16:44:54 +03:00
Dmitry Stogov
642c379092
Prevent attempts of compile-time evaluation of invalid operators (e.g. division/modulo by zero and shift by negative number)
2015-06-29 12:58:07 +03:00
Dmitry Stogov
1bba4452e7
Reverted wrong fb08798c9f
2015-06-29 12:20:09 +03:00
Xinchen Hui
5ba28d76d2
Fixed segfault in wordpress (introduced in rev 4a4529adb0
)
2015-06-29 15:13:09 +08:00
Bob Weinand
fb08798c9f
Fix bug #69957 (Different ways of handling div/mod by zero)
2015-06-28 18:22:59 +02:00
Bob Weinand
4a4529adb0
Fix rope memory leaks upon exception
2015-06-28 15:42:15 +02:00
Bob Weinand
2894bc5bb8
Use ZEND_INIT_STATIC_METHOD_CALL for literals of form "classname::method"
2015-06-26 19:55:13 +02:00
Xinchen Hui
307c734bed
Better way to fix (Fix bug #69871 (short-circuiting failure with smart_branch))
2015-06-19 23:05:35 +08:00
Xinchen Hui
509d75527a
Fixed Conditional jump or move depends on uninitialised value(s)
...
reproduced by Bug #69868 's test script
2015-06-18 19:56:50 +08:00
Xinchen Hui
c58c5e779a
Fixed bug #69868 (Invalid read of size 1 in zend_compile_short_circuiting)
2015-06-18 19:53:26 +08:00
Dmitry Stogov
a524a375d9
Improved class type hints checks, by caching resolved class entries in run-time cache.
2015-06-17 12:07:43 +03:00
Nikita Popov
4448843b7c
Move check for CT div by zero into common function
2015-06-16 18:09:59 +02:00
Bob Weinand
52e9a772a3
Fully fixing all the affected const expr cases (see bug #69832 )
2015-06-16 16:53:30 +02:00
Bob Weinand
9db81340ba
Fix bug #69832 (Assertion failure)
2015-06-15 17:43:09 +02:00
Bob Weinand
37c91b8d03
Fix off by one in short_circuiting optimization
2015-06-14 17:47:35 +02:00
Xinchen Hui
f1ae57f155
Simplify the condition
2015-06-14 22:56:06 +08:00
Bob Weinand
7221bd682f
Revert "Revert "Expand optimizations regarding short-circuting a bit""
...
This reverts commit 3770a5ac66
.
Fixes the bug which probably made make install fail on travis
(It never happened to me that all tests passed, but make install failed...)
2015-06-14 15:46:11 +02:00