Commit Graph

2299 Commits

Author SHA1 Message Date
Nikita Popov
de66e80d75 Don't leave holes in func_get_args() and backtraces
Argument lists should always be continuous and hole-free, even if
local variables are unset. Replace UNDEF values with NULLs.
2017-06-25 15:27:45 +02:00
Xinchen Hui
5269c4cacb Fixed bug #74657 (Undefined constants in array properties result in broken properties) 2017-05-27 12:06:43 +08:00
Xinchen Hui
87d56a3d07 Fixed bug #74546 (SIGILL in ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_CONST_HANDLER()) 2017-05-08 11:32:08 +08:00
Nikita Popov
e433c23b96 Improve accuracy of opline lineno information
If compile_var() was used instead of compile_expr() we did not
update the current lineno.
2017-04-15 18:15:24 +02:00
Xinchen Hui
eb03f16442 Fixed bug #74408 (Endless loop bypassing execution time limit) 2017-04-11 18:46:16 +08:00
Thomas Punt
744c4a5592 Resolve bug #74188 (undefined statics raising with ?? operator) 2017-04-09 15:29:31 +02:00
Sara Golemon
0fb640c717 Fix bug where yield from is captured too greedily
In the following piece of code:

```php
function from1234($x) {
  return $x;
}
function foo($x) {
  yield from1234($x);
}
```

The statement inside foo is taken as `yield from` `1234($x)`
which is neither the intent, nor even legal syntax for an fcall.

Do a lookahead for breaking non-label characters after the
`yield from` and only accept it if they occur.
2017-03-23 13:31:06 -07:00
Nikita Popov
29ee3e3c49 Fixed bug #73960 2017-03-10 18:20:32 +01:00
Sara Golemon
868930e079 Fix potential crash when setting invalid declare value
Using a non-literal expression in a declare value can cause the
compiler to crash trying to turn that AST node into a usable zval.

There was an existing test for such values using 'encoding',
but that didn't crash because it's handled by the lexer
rather than being compiled.

Trying to use a non-literal with ticks reproduces the crash.
2017-02-28 17:08:23 -08:00
Xinchen Hui
3917350531 Fixed bug #73989 (PHP 7.1 Segfaults within Symfony test suite) 2017-02-13 19:16:17 +08:00
Xinchen Hui
26fdebc63b Fixed bug #74084 (Out of bound read - zend_mm_alloc_small) 2017-02-12 20:34:08 +08:00
Anatol Belski
044dd30440 use some dynamically generated NAN as well 2017-02-07 13:16:30 +01:00
Andrea Faulds
21d7878690 Fix bug #73954 2017-02-05 01:30:20 +00:00
Mitch Hagstrand
dd9cf23457 BUG #73998: Numeric properties are not accessible from get_object_vars 2017-02-02 18:33:10 +01:00
Xinchen Hui
04379bcb1d Fixed bug #73916 (zend_print_flat_zval_r doesn't consider reference) 2017-01-13 13:04:37 +08:00
Sara Golemon
5df97b339e [ast] Fix exporting **= in expansion of assign op
(cherry picked from commit 9c3865eb6a)
2017-01-08 18:43:47 +01:00
Joe Watkins
0d09b98ac4
remove duplicate test 2017-01-04 14:50:59 +00:00
Joe Watkins
b39310c715
fix test 2017-01-04 14:36:18 +00:00
Nikita Popov
432660f73f Another try at making concat_003 more reliable
Use array_fill() for the array population loop -- this isn't the
part that is being tested and on PHP 7.0 w/o opcache this duplicates
the inner array a lot.
2016-12-29 21:39:40 +01:00
Nikita Popov
c41826d1e6 Increase timing quota for small string concat test
Test is regularly failing on Travis.
2016-12-21 21:27:47 +01:00
David Walker
5733fd1caf Fix #73753 - Unpacked Arrays and Duplication 2016-12-21 21:18:20 +01:00
Dmitry Stogov
3c6a2fb08c Fixed bug #73792 (invalid foreach loop hangs script) 2016-12-20 16:48:57 +03: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
a983b728a7 Fixed behavior of failing compound assignments (they shouldn't change the source value when exception thrown during type converion). 2016-12-05 21:45:08 +03:00
Bob Weinand
ffc1ef1eed Fix leak when using $this outside of object context 2016-12-03 18:28:08 +01:00
Bob Weinand
3c1a0d75bf Fix test of wrong operator in self_xor.phpt 2016-12-02 15:41:47 +01:00
Dmitry Stogov
2b70d44b57 Fixed behavior of failing compound assignments (they shouldn't change the source value when exception thrown during type converion). 2016-12-02 15:13:55 +03:00
Dmitry Stogov
dbf39cddd9 Fixed behavior of failing compound assignments (they shouldn't change the source value). 2016-12-02 13:58:44 +03:00
Dmitry Stogov
67d90a4870 Fixed possible memory leak in &=, |=, ^=. 2016-12-02 12:34:46 +03:00
Dmitry Stogov
970f21be97 Fixed calling generators through magic __call() 2016-11-28 12:20:19 +03:00
Christoph M. Becker
8957ff36b3 Merge branch 'PHP-5.6' into PHP-7.0 2016-11-01 20:24:10 +01:00
Christoph M. Becker
2eacb53fc4 Fix #73436: Setting allow_url_fopen to Off makes several tests fail
We make sure that these tests run with allow_url_fopen=1.
2016-11-01 20:13:53 +01:00
Xinchen Hui
eca84946a4 Fixed bug #73350 (Exception::__toString() cause circular references) 2016-10-22 14:50:21 +08:00
Bob Weinand
8b177f6a2a Fixed bug #73338 (Exception thrown from error handler may crash) 2016-10-18 14:14:24 +02:00
Dmitry Stogov
7bd4e7208e Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed bug #73337 (try/catch not working with two exceptions inside a same operation)
2016-10-18 15:04:49 +03:00
Dmitry Stogov
6558559bcc Fixed bug #73337 (try/catch not working with two exceptions inside a same operation) 2016-10-18 14:48:01 +03:00
Stanislav Malyshev
1bdb30a429 Merge branch 'PHP-7.0.12' into PHP-7.0
* PHP-7.0.12:
  set versions and release date
  sync NEWS
  Revert "Fixed bug #73067 (__debugInfo crashes when throwing an exception)"
  Fix for #73240 - Write out of bounds at number_format
  Fix bug #73257 and bug #73258 - SplObjectStorage unserialize allows use of non-object as key
  set versions
  Fix bug #73091 - Unserializing DateInterval object may lead to __toString invocation
2016-10-11 16:46:51 -07:00
Anatol Belski
8c9f639a1d Revert "Fixed bug #73067 (__debugInfo crashes when throwing an exception)"
This reverts commit 2d8ab51576.
2016-10-11 11:24:08 +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
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
437942d972 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-28 22:36:58 +02:00
Nikita Popov
99bf19c177 Check next_index_insert failure in ADD_ARRAY_ELEMENT 2016-09-28 22:35:27 +02:00
Nikita Popov
b7cbaa7f43 Fix bug #73181 2016-09-27 19:47:48 +02:00
Dmitry Stogov
d279118422 Fixed bug #73156 (segfault on undefined function) 2016-09-26 14:14:57 +03:00
Nikita Popov
8831a12da1 Fixed bug #73163 2016-09-24 13:18:43 +02:00
John Boehr
68e602ff0a Fix bug #69579 2016-09-22 12:38:07 +02:00
Xinchen Hui
2d8ab51576 Fixed bug #73067 (__debugInfo crashes when throwing an exception) 2016-09-13 10:58:57 +08:00
Dmitry Stogov
b66039db33 Fixed bug #72944 (Null pointer deref in zval_delref_p). 2016-08-29 12:02:50 +03:00