Commit Graph

2099 Commits

Author SHA1 Message Date
Dmitry Stogov
141d1ba980 Introduced "zend_type" - an abstraction for type-hinting representation. 2017-01-13 11:37:46 +03:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Nikita Popov
3df43437fe Merge branch 'PHP-7.1' 2016-12-21 22:12:17 +01:00
Nikita Popov
ed0602fe31 Fix string extension in negate_num_string
Forgot to actually assign the reallocated string...
2016-12-21 22:11:17 +01:00
Xinchen Hui
b6553d422d Merge branch 'PHP-7.1'
* PHP-7.1:
  Revert "Reorder the oplines" (Break Zend/tests/return_types/bug71092.phpt)
2016-12-21 14:27:13 +08:00
Xinchen Hui
82988d3e41 Revert "Reorder the oplines" (Break Zend/tests/return_types/bug71092.phpt)
This reverts commit a12f43ee2c.
2016-12-21 14:24:14 +08:00
Xinchen Hui
adf0256c4a Merge branch 'PHP-7.1'
* PHP-7.1:
  Reorder the oplines
2016-12-17 20:09:49 +08:00
Xinchen Hui
a12f43ee2c Reorder the oplines
1. we should only do the return type checking when it is really about to
return
2. for 029.php, actually, the exception threw should be discard while it
jmp into finally(it could be observed by change the return to return an array)
3. after this fix, the test 029.phpt behavior consistently with 7.0
4. good for optimizer too
2016-12-17 20:06:18 +08:00
Nikita Popov
fe98ff94bb Merge branch 'PHP-7.1' 2016-12-11 13:34:28 +01:00
Nikita Popov
2c70581338 Fix T_NUM_STRING negation
T_NUM_STRING follows the rules of symtable numeric string
conversion. If the offset isn't an integer under those rules, it
is treated as a string. This should apply to negated T_NUM_STRINGs
as well.
2016-12-11 13:33:25 +01:00
Xinchen Hui
1113d589dc Merge branch 'PHP-7.1'
* PHP-7.1:
  Update NEWS
  Fixed bug #73663 ("Invalid opcode 65/16/8" occurs with a variable created with list())
2016-12-06 17:33:27 +08:00
Xinchen Hui
d7a759916d Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73663 ("Invalid opcode 65/16/8" occurs with a variable created with list())
2016-12-06 17:32:48 +08:00
Xinchen Hui
358bd77b23 Fixed bug #73663 ("Invalid opcode 65/16/8" occurs with a variable created with list()) 2016-12-06 17:32:32 +08:00
Dmitry Stogov
9c1920d9e8 Revert "Fix memory leaks with FE_RESET upon empty iterator"
This reverts commit 00e516e575.
2016-12-02 11:58:36 +03:00
Bob Weinand
00e516e575 Fix memory leaks with FE_RESET upon empty iterator
Solved by manually freeing and jumping to the opcode *after* FE_FREE
2016-11-30 17:44:34 +01:00
Xinchen Hui
fd8797298b Merge branch 'PHP-7.1'
* PHP-7.1:
  Update NEWS
  Fixed bug #73585 (Logging of "Internal Zend error - Missing class information" missing class name)
2016-11-24 12:05:07 +08:00
Xinchen Hui
c1c91c95a6 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73585 (Logging of "Internal Zend error - Missing class information" missing class name)
2016-11-24 12:03:44 +08:00
Xinchen Hui
e19d263d81 Fixed bug #73585 (Logging of "Internal Zend error - Missing class information" missing class name)
Actually, I doubt how thing bug could be triggered
2016-11-24 12:02:02 +08:00
Kalle Sommer Nielsen
2104bea5d7 Remove Netware support
If this does not break the Unix system somehow, I'll be amazed. This should get most of it out, apologies for any errors this may cause on non-Windows ends which I cannot test atm.
2016-11-12 11:20:01 +01:00
Dmitry Stogov
c71ab7260a Merge branch 'PHP-7.1'
* PHP-7.1:
  Intriduced ZEND_ACC_INHERITED class flag. It's going to be helpful for static optimisations, when "parent" is not known yet.
2016-11-01 22:58:59 +03:00
Dmitry Stogov
bdc1ba3e3a Intriduced ZEND_ACC_INHERITED class flag.
It's going to be helpful for static optimisations, when "parent" is not known yet.
2016-11-01 22:56:25 +03:00
Nikita Popov
f8a6df4706 Merge branch 'PHP-7.0' into PHP-7.1 2016-10-08 17:00:56 +02:00
Nikita Popov
2a75f5026a Fix bug #66773, #66862
This a partial backport of 8754b19. It
a) fixes the class/function/constant import table confusion in the
   namespaced case, and
b) restricts conflict checks to a single file based on a filename
   pointer comparison.

It does not fix the issues with filename reuse (e.g. due to eval)
and late-bound classes. This part of the change requires globals
changes.
2016-10-08 17:00:27 +02:00
Nikita Popov
8754b191f7 Fix "already in use" check inconsistencies/bugs
This fixes the following issues:
 * "use function" and "use const" inside namespaced code were checking
   for conflicts against class imports. Now they always check against
   the correct symbol type.
 * Symbol conflicts are now always checked within a single file only.
   Previously class uses inside namespaced code were checked globally.
   This behavior is illegal because symbols from other files are not
   visible if opcache is used, resulting in behavioral discrepancies.
   Additionally this made the presence/absence of symbol errors dependent
   on autoloading order, which is volatile.
 * The "single file" restriction is now enforced by collecting defined
   symbols inside a separate hash table. Previously it was enforced
   (for the non-namespaced case) by comparing the filename of the
   symbol declaration. However this is inaccurate if the same filename
   is used multiple times, such as may happen if eval() is used.
 * Additionally the previous approach relies on symbols being registered
   at compile-time, which is not the case for late-bound classes, which
   makes the behavior dependent on class declaration order, as well as
   opcache (which may cause delayed early-binding).
 * Lastly, conflicts are now consistently checked for conditionally
   defined symbols. Previously only declaration-after-use conflicts were
   checked in this case. Now use-after-declaration conflicts are
   detected as well.
2016-10-07 00:12:55 +02:00
Nikita Popov
56a7646ab2 Merge branch 'PHP-7.0' into PHP-7.1 2016-09-28 23:22:48 +02:00
Nikita Popov
e520b9e127 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-28 23:22:11 +02:00
Nikita Popov
1f5412982c Handle resource keys in constexpr arrays 2016-09-28 23:11:02 +02:00
Nikita Popov
40b8105cca Fix the constant array case as well 2016-09-28 23:05:21 +02:00
Nikita Popov
19f1ff5ad0 Combine code for keyed/unkeyed list() 2016-09-28 21:43:48 +02:00
Nikita Popov
6f9e5684a1 Fix segfault when empty entry in keyed array assignment 2016-09-28 21:43:48 +02:00
Nikita Popov
bd893061d6 Use SEND_USER for CONST|TMP as well
Otherwise we're missing the "expected to be a reference, value
given" warning that appears for ordinary calls to call_user_func().

Also update an UPGRADING note with recent changes wrt
call_user_func().
2016-09-25 12:39:23 +02:00
Nikita Popov
30af80610e Compile intval() etc to casts 2016-09-09 15:45:46 +02:00
Nikita Popov
135f275836 Add ISSET_ISEMPTY_STATIC_PROP to smart branch list 2016-09-06 22:19:34 +02:00
Dmitry Stogov
b5bab0fce8 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #72944 (Null pointer deref in zval_delref_p).
2016-08-29 12:07:54 +03:00
Dmitry Stogov
b66039db33 Fixed bug #72944 (Null pointer deref in zval_delref_p). 2016-08-29 12:02:50 +03:00
Nikita Popov
1397f754c8 Fix handling of qualified nullable parameter types
compile_typename() can't deal with TYPE_NULLABLE flags, drop it
beforehand.
2016-08-16 12:43:17 +02:00
Nikita Popov
f4d1af7981 Fix build
Missed this occurrence...
2016-07-23 00:12:11 +02:00
Nikita Popov
e3e400c983 Fix return from by-ref generators 2016-07-14 15:44:04 +02:00
Xinchen Hui
efdc8ccd52 Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed bug #72594 (Calling an earlier instance of an included anonymous class fatals)

Conflicts:
	Zend/zend_compile.c
2016-07-14 13:38:27 +08:00
Xinchen Hui
8c5b27e061 Fixed bug #72594 (Calling an earlier instance of an included anonymous class fatals) 2016-07-14 13:36:43 +08:00
Dmitry Stogov
3b8cb2119b Fixed bug #72347 (VERIFY_RETURN type casts visible in finally)
Fixed bug #72216 (Return by reference with finally is not memory safe)
Fixed bug #72215 (Wrong return value if var modified in finally)
2016-07-13 15:08:28 +03:00
Xinchen Hui
d77a8b052b This became unnecessary after #72543 is fixed 2016-07-07 15:25:27 +08:00
Dmitry Stogov
fbca255cd0 Fixed bug #71539 (Memory error on $arr[$a] =& $arr[$b] if RHS rehashes) 2016-07-07 00:59:44 +03:00
Nikita Popov
ab304579ff Forbid use of array() in nested destructuring
Previously array() was only forbidden on the outermost level.
2016-07-06 21:15:54 +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
Aaron Piotrowski
d9a9cf8eca Merge branch 'master' into iterable 2016-07-03 22:42:10 -05: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
cb7cc16c2d Use DO_UCALL for method calls 2016-06-28 12:05:03 +02:00
Xinchen Hui
b8a9e98166 Fixed build 2016-06-28 15:54:20 +08:00