1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 10:43:30 +02:00
Commit Graph

12629 Commits

Author SHA1 Message Date
Nikita Popov 16861838a5 Merge branch 'PHP-7.1' 2017-03-23 22:50:21 +01:00
Nikita Popov e3e3547627 Merge branch 'PHP-7.0' into PHP-7.1 2017-03-23 22:49:51 +01: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
xKhorasan 6a1d4cd47a Fixed bug #74300 2017-03-23 22:06:46 +01:00
Sara Golemon 819e66599a Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix bug where `yield from` is captured too greedily
2017-03-23 13:40:09 -07:00
Sara Golemon 7835e2ebc5 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug where `yield from` is captured too greedily
2017-03-23 13:38:58 -07: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
Rowan Collins 1b565f1393 Change 'undefined constant' from E_NOTICE to E_WARNING and mention deprecation
Implements RFC "Deprecate and Remove Bareword (Unquoted) Strings"
[https://wiki.php.net/rfc/deprecate-bareword-strings]
2017-03-23 18:52:43 +01:00
Nikita Popov fec708f518 Simplify increment_lineno handling 2017-03-22 22:33:05 +01:00
Nikita Popov ea36cf2b89 Merge branch 'PHP-7.1' 2017-03-17 20:21:28 +01:00
Nikita Popov f2c35fdda8 Merge branch 'PHP-7.0' into PHP-7.1 2017-03-17 20:20:43 +01:00
Nikita Popov 2e83082605 Fix bug #74265 2017-03-17 20:19:40 +01:00
Nikita Popov 329d4edff7 Merge branch 'PHP-7.1' 2017-03-17 13:36:03 +01:00
Nikita Popov 893bf7ecdd Merge branch 'PHP-7.0' into PHP-7.1 2017-03-17 13:35:50 +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 6ad0a6fb04 Merge branch 'PHP-7.1' 2017-03-15 19:50:26 +01:00
Nikita Popov 2bba4a0d7f Fix bug #69676 2017-03-15 19:49:02 +01:00
Nikita Popov 16ae9f82e8 Fix SKIPIF conditions 2017-03-14 12:06:58 +01:00
Nikita Popov edcabf6d07 Drop unnecessary allocator return value checks 2017-03-13 22:07:15 +01:00
Nikita Popov b3ca0c2500 zend-test extension to house code that is required for testing internal APIs, but that we would not want to expose for regular builds 2017-03-12 18:58:50 +00:00
Nikita Popov 22e6b5ef22 Merge branch 'PHP-7.1' 2017-03-10 18:21:09 +01:00
Nikita Popov 280e8dafe4 Merge branch 'PHP-7.0' into PHP-7.1 2017-03-10 18:20:58 +01:00
Nikita Popov 29ee3e3c49 Fixed bug #73960 2017-03-10 18:20:32 +01:00
Remi Collet ec31924cd6 Constify to void build warning for C++ ext. [-Wwrite-strings]
Example (with v8js):

/builddir/build/BUILD/php-pecl-v8js-1.3.4/NTS/v8js_class.cc: In function 'void v8js_execute_script(zval*, v8js_script*, long int, long int, long int, zval**)':
/usr/include/php/Zend/zend.h:204:57: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
 #define zend_bailout()  _zend_bailout(__FILE__, __LINE__)
                                                         ^
/builddir/build/BUILD/php-pecl-v8js-1.3.4/NTS/v8js_class.cc:633:3: note: in expansion of macro 'zend_bailout'
   zend_bailout();
   ^~~~~~~~~~~~
2017-03-10 11:52:26 +01:00
Nikita Popov 8a34b33c59 Merge branch 'PHP-7.1' 2017-03-09 20:48:32 +01:00
Nikita Popov 305f3c2b76 Merge branch 'PHP-7.0' into PHP-7.1 2017-03-09 20:48:24 +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
Joe Watkins 89e403982c Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix bug #74149 static embed SAPI linkage error
2017-03-09 07:44:42 +00:00
Joe Watkins 8599ce4f18 Fix bug #74149 static embed SAPI linkage error 2017-03-09 07:43:58 +00:00
Anatol Belski fdba33922a move to hash API for interned strings ht management 2017-03-07 19:01:00 +01:00
Nikita Popov 361b7159e7 Merge branch 'PHP-7.1' 2017-03-07 13:18:04 +01:00
Nikita Popov 8a6281455e Merge branch 'PHP-7.0' into PHP-7.1 2017-03-07 13:17:33 +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 c698299550 Interned strings unification for TS/NTS
Hereby, interned strings are supported in thread safe PHP. The patch
implements two types of interned strings

- interning per process, strings are not freed till process end
- interning per request, strings are freed at request end

There is no runtime interning.

With Opcache, all the permanent iterned strings are copied into SHM on
startup, additional copying into SHM might happen on demand.
2017-03-04 10:39:13 +01:00
Anatol Belski 834d13879f Merge branch 'PHP-7.1'
* PHP-7.1:
  improve signal globals consistency check for TS
2017-03-02 20:36:12 +01:00
Anatol Belski 1d4248af42 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  improve signal globals consistency check for TS
2017-03-02 20:34:48 +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 5b6ee004ba Merge branch 'PHP-7.1'
* PHP-7.1:
  do not try to handle signals, when globals are inconsistent
2017-03-02 16:43:10 +01:00
Anatol Belski 494fc16184 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  do not try to handle signals, when globals are inconsistent
2017-03-02 16:41:43 +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 5b52a44860 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix potential crash when setting invalid declare value
2017-02-28 17:18:08 -08:00
Sara Golemon c5727a30cf Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix potential crash when setting invalid declare value
2017-02-28 17:17:41 -08: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
Remi Collet 18293f9a6f Merge branch 'PHP-7.1'
* PHP-7.1:
  make test slower again
2017-02-28 11:36:42 +01:00
Remi Collet 3006d1de5b make test slower again 2017-02-28 11:36:24 +01:00
Xinchen Hui b806287e43 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #74157 (Segfault with nested generators)
2017-02-26 12:07:03 +08:00
Xinchen Hui 6a584cf318 Fixed bug #74157 (Segfault with nested generators) 2017-02-26 12:05:56 +08:00
Xinchen Hui fa6144b077 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #74164 (PHP hangs when an invalid value is dynamically passed to typehinted by-ref arg)
  Fixed typo (it should be typo)
2017-02-25 12:00:57 +08:00
Xinchen Hui 36fcc4cb5d Fixed bug #74164 (PHP hangs when an invalid value is dynamically passed to typehinted by-ref arg) 2017-02-25 12:00:42 +08:00