Commit Graph

11502 Commits

Author SHA1 Message Date
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
Nikita Popov
75b83ec2fd Add NEWS 2017-04-09 15:52:37 +02:00
Thomas Punt
744c4a5592 Resolve bug #74188 (undefined statics raising with ?? operator) 2017-04-09 15:29:31 +02:00
Anatol Belski
feeb35e438 fix possible out of bounds buffer access 2017-04-03 15:20:32 +02:00
Nikita Popov
d719b46222 Fix sequencing UB 2017-03-23 22:48:45 +01:00
Nikita Popov
f5951cc81b Fix lineno for AST_ZVAL nodes 2017-03-23 22:48:41 +01: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
2e83082605 Fix bug #74265 2017-03-17 20:19:40 +01:00
Nikita Popov
183cd048f1 Fix AST start lineno for list nodes
If the node is initialized with children, check if a child has a
lower start lineno, similar to what we do for fixed-sized nodes
as well.
2017-03-17 13:35:24 +01:00
Nikita Popov
29ee3e3c49 Fixed bug #73960 2017-03-10 18:20:32 +01:00
Nikita Popov
177f87cf05 Fixed bug #73370
If len=0 malloc() is allowed to return NULL.
2017-03-09 20:47:06 +01:00
Nikita Popov
549a30d2cd Fix out of bounds access in gc_find_additional_buffer() 2017-03-07 13:16:06 +01:00
Anatol Belski
18f7e26257 improve signal globals consistency check for TS
Seems when we receive TERM, TLS is destroyed completely. In that case,
not only signal globals, but the entire globals array doesn't exist
anymore.
2017-03-02 20:27:27 +01:00
Anatol Belski
c7b2c698d0 do not try to handle signals, when globals are inconsistent 2017-03-02 16:40:38 +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
Anatol Belski
1623ef10c9 initialize valid_symbol_table, important for the main thread
to prevent php_errormsg population on invalid symlol_table
2017-02-18 17:58:17 +01:00
Ondřej Surý
61e59db99d Disable RTLD_DEEPBIND when compiling with AddressSanitizer (-fsanitize=address).
The AddressSanitizer doesn't support RTLD_DEEPBIND resulting in
erratic errors when deinitializing phar module and possibly others.

Clang use __has_feature() macro to indicate compilation with
AddressSanitizer while gcc uses __SANITIZE_ADDRESS__ define.

Fixes bug #73677.
2017-02-16 17:35:29 +01: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
Xinchen Hui
db7c0badd4 Fixed typo 2017-02-11 00:01:09 +08:00
dreamsxin
7a0adb4cd2 Add #ifndef restrict 2017-02-08 01:00:35 +01:00
Christian Schmidt
714d825b62 Fix detection of isnan and isinf
The isnan() and isinf() are C99 macros not functions.

Also fix is_infinite(-INF) in case isinf is not defined.
2017-02-08 00:53:18 +01:00
Anatol Belski
044dd30440 use some dynamically generated NAN as well 2017-02-07 13:16:30 +01:00
Anatol Belski
fd521a22f7 switch to smart str conversion routine to hide exact NAN type
see https://github.com/php/php-src/pull/2356#issuecomment-277564135
2017-02-07 12:01:14 +01:00
Nikita Popov
8a8aa67844 Revert "Fix detection of isnan and isinf"
This reverts commit 9ea0949f43.
2017-02-06 01:45:53 +01:00
Christian Schmidt
9ea0949f43 Fix detection of isnan and isinf
The isnan() and isinf() are C99 macros not functions.

Also fix is_infinite(-INF) in case isinf is not defined.
2017-02-05 18:09:04 +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
Dmitry Stogov
3f89b630b4 typo 2017-02-01 17:36:55 +03:00
Dmitry Stogov
15e9aa1706 fixed macro 2017-02-01 16:05:33 +03:00
Anatol Belski
5b5130c4ff Revert "backport 51e1da6ea1 into 7.0"
This reverts commit 8da8756312.
2017-01-31 14:21:20 +01:00
andrewnester
f65ae82c55
Fixed #73973 - debug_zval_dump() assertion error for resource consts with --enable-debug 2017-01-26 09:03:47 +00:00
Joe Watkins
d636467937
move decl to correct place 2017-01-23 05:33:58 +00:00
andrewnester
6f912f7c04
Fixed #73969 - Fixed segmentation fault when debug_print_backtrace called 2017-01-22 16:11:25 +00:00
Anatol Belski
8da8756312 backport 51e1da6ea1 into 7.0 2017-01-21 02:56:15 +01:00
Remi Collet
f81b7df618 Fixed bug #73965 DTrace reported as enabled when disabled 2017-01-20 17:45:15 +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
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06: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
Joe Watkins
63d116e571
Merge branch 'pull-request/1312' into PHP-7.0
* pull-request/1312:
  get_defined_functions extra parameter to exclude disabled functions
  news entry for PR #1312
2017-01-04 13:34:31 +00:00
Stanislav Malyshev
4cc0286f2f Fix #73832 - leave the table in a safe state if the size is too big. 2017-01-02 20:14:05 -08: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
Nikita Popov
fa92a16e46 Fix stack management in ini scanner 2016-12-16 20:54:46 +01:00
Nikita Popov
f99bf70360 Partially fix bug #70492
The libmagic portion is missing.
2016-12-14 18:11:27 +01:00