1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 16:08:35 +02:00
Commit Graph

116477 Commits

Author SHA1 Message Date
Dmitry Stogov 249e9a63e8 Fixed JIT for LONG->DOUBLE conversion when optimizer disabled 2019-11-27 14:31:24 +03:00
Christoph M. Becker b6e79f3724 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78840: imploding $GLOBALS crashes
2019-11-27 09:34:57 +01:00
Christoph M. Becker 30aa2e8932 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78840: imploding $GLOBALS crashes
2019-11-27 09:33:55 +01:00
Christoph M. Becker fee38633d2 Fix #78840: imploding $GLOBALS crashes
We add support for IS_INDIRECT zvals to implode().
2019-11-27 09:32:16 +01:00
Dmitry Stogov b046a8f7f8 Fixed incorrect JIT compilation 2019-11-26 16:45:19 +03:00
avkarenow 182f98a194 Open opcache.error_log with 'a' flag
When opcache.error_log is set to log to file the read flag is not needed and used.
2019-11-26 09:29:27 +03:00
Christoph M. Becker 0e20220cfc Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #77638: var_export'ing certain class instances segfaults
2019-11-25 15:58:45 +01:00
Christoph M. Becker 717730ddd1 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #77638: var_export'ing certain class instances segfaults
2019-11-25 15:57:56 +01:00
Christoph M. Becker 23c65a8173 Fix #77638: var_export'ing certain class instances segfaults
If objects return immutable property hash tables (typically,
`zend_empty_array`), we must not try to apply recursion protection on
those.
2019-11-25 15:54:11 +01:00
Dmitry Stogov 0f2b6ece4e Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #78868 (Calling __autoload() with incorrect EG(fake_scope) value)
  Consolidate NEWS for 7.4.0 release
  WIP: Merge NEWS
2019-11-25 14:10:53 +03:00
Dmitry Stogov 2ebf530946 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #78868 (Calling __autoload() with incorrect EG(fake_scope) value)
2019-11-25 14:09:18 +03:00
Dmitry Stogov bb30fe9e2b Fixed bug #78868 (Calling __autoload() with incorrect EG(fake_scope) value) 2019-11-25 14:05:43 +03:00
Christoph M. Becker 1de312d9b1 Document the need for merging NEWS sections before x.y.0 2019-11-24 12:19:49 +01:00
Derick Rethans 71d42dc794 Consolidate NEWS for 7.4.0 release 2019-11-24 10:23:33 +01:00
Derick Rethans c16cbfd1da WIP: Merge NEWS 2019-11-23 20:00:51 +01:00
Tyson Andre f0484e939a Merge branch 'PHP-7.4' 2019-11-23 10:46:59 -05:00
Tyson Andre b037fe5bd1 Handle reallocated root buffer during GC destroy phase (v2)
We no longer protect GC during the destroy phase, so we need to
deal with buffer reallocation.

Note that the implementation of spl_SplObjectStorage_free_storage
will call the destructor of SplObjectStorage, and free the instance properties,
which I think is what caused the root buffer to be reallocated.
(`current` is a pointer for an index within the root buffer?)

This fixes bug #78811 for me.

Closes GH-4935
2019-11-23 10:45:20 -05:00
Tyson Andre 500ba8b2b8 Handle reallocated root buffer during GC destroy phase (v2)
We no longer protect GC during the destroy phase, so we need to
deal with buffer reallocation.

Note that the implementation of spl_SplObjectStorage_free_storage
will call the destructor of SplObjectStorage, and free the instance properties,
which I think is what caused the root buffer to be reallocated.
(`current` is a pointer for an index within the root buffer?)

This fixes bug #78811 for me.

Closes GH-4935
2019-11-23 10:24:48 -05:00
Christoph M. Becker e7e15450ef Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78853: preg_match() may return integer > 1
2019-11-22 19:30:43 +01:00
Christoph M. Becker cfb643ca2b Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78853: preg_match() may return integer > 1
2019-11-22 19:29:11 +01:00
Christoph M. Becker e1da72bdf1 Fix #78853: preg_match() may return integer > 1
Commit 54ebebd[1] optimized the match loop, but for this case it has
been overlooked, that we must only loop if we're doing global matching.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=54ebebd686255c5f124af718c966edb392782d4a>
2019-11-22 19:26:26 +01:00
George Peter Banyard 501a72e354 Promote warning to value error in strpbrk()
Closes GH-4598
2019-11-22 00:36:54 +01:00
George Wang 8a977e07d0 Merge branch 'PHP-7.4' 2019-11-21 17:59:05 -05:00
George Wang 99b8e67615 Merge branch 'PHP-7.3' into PHP-7.4 2019-11-21 17:58:44 -05:00
George Wang e981f5af51 Merge branch 'PHP-7.2' into PHP-7.3 2019-11-21 17:58:16 -05:00
George Wang c7141412ce Added environment LSAPI_CLEAN_SHUTDOWN to control clean shutdown. Update SAPI version to LiteSpeed v7.6 . 2019-11-21 17:57:50 -05:00
Christoph M. Becker 424d34d1c0 Make test more resilient
`socket_bind()` may raise `E_WARNING` on failure, which would cause the
test to be marked as borked.  Since we're checking the return value
anyway, we can silence warnings.
2019-11-21 13:40:36 +01:00
Christoph M. Becker b40799efcd Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78849: GD build broken with -D SIGNED_COMPARE_SLOW
2019-11-21 10:04:03 +01:00
Christoph M. Becker b78ec58f09 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78849: GD build broken with -D SIGNED_COMPARE_SLOW
2019-11-21 10:02:33 +01:00
Christoph M. Becker b4f501d5a4 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78849: GD build broken with -D SIGNED_COMPARE_SLOW
2019-11-21 10:01:05 +01:00
Christoph M. Becker 9b92c1d154 Fix #78849: GD build broken with -D SIGNED_COMPARE_SLOW
Apparently, this has not been tested for a long time, and might be a
refactoring relict.  Anyhow, we have to pass the context to
`GIFNextPixel` as well.
2019-11-21 09:59:26 +01:00
Adam Harvey a3a9a1e040 Merge branch 'PHP-7.4'
* PHP-7.4:
  Make the UPGRADING note about ArrayObject more explicit.
2019-11-20 15:39:51 -08:00
Adam Harvey 00df73c30d Make the UPGRADING note about ArrayObject more explicit.
We noticed the BC break when testing `curl_setopt()`, and hadn't interpreted
this note as affecting internal functions in general, so this adds a sub-bullet
to note that.

This overlaps a bit with the previous bullet, but since I don't know exactly
which operations were in mind at the time, I've elected to preserve them both.
Bits are cheap.
2019-11-20 15:33:04 -08:00
Tyson Andre f7c44ef2a0 Make opcache infer array_key_exists is non-null bool
array_key_exists now throws a TypeError instead of returning null
for invalid arguments after 14bdb0cfc7
2019-11-20 00:11:51 +03:00
Fabien Villepinte e2a8cc0114 Fix typo with msgfmt_parse_message() 2019-11-19 19:48:13 +01:00
Craig Duncan e208d236b3 Convert apache2handler arginfo to php stubs 2019-11-18 15:07:04 +01:00
Michael Voříšek 7a5dbcd660 Remove clearstatcache function prototype defned twice 2019-11-18 14:36:10 +01:00
Fabien Villepinte f67b27fac6 Fix typo in pcntl_sigwaitinfo proto 2019-11-18 12:53:36 +01:00
Christoph M. Becker c58b44f34a Merge branch 'PHP-7.4'
* PHP-7.4:
  Update NEWS
2019-11-18 12:49:28 +01:00
Christoph M. Becker bcb8ab304e Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Update NEWS
2019-11-18 12:48:55 +01:00
Christoph M. Becker 3b46fbfc36 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Update NEWS
2019-11-18 12:47:53 +01:00
Christoph M. Becker f6eac76b65 Update NEWS 2019-11-18 12:46:43 +01:00
Fabien Villepinte 2adb1bba17 Fix proto of forward_static_call_array
Closes GH-4928.
2019-11-18 12:46:05 +01:00
Máté Kocsis c58b12334d Add union return types with one class 2019-11-18 12:44:38 +01:00
Máté Kocsis 100552d4b5 Add stubs for PDO 2019-11-18 12:38:10 +01:00
Craig Duncan a9e8cd2b6b Convert the example skeleton extension to use arginfo stubs 2019-11-18 11:41:24 +01:00
Tyson Andre 7901913b83 Speed up foreach/FE_FREE (optimize for arrays without gc)
In the case where there are still references to an array being iterated
over when the iterator is freed (or the array is not reference counted):

- There's need to save the opline.
- There's no need to check for exceptions.

```
// Before: 0.404 seconds
// After:  0.362 seconds
// loop_iter_empty(1000, 5000);
function loop_iter_empty(int $a, int $b) {
  $values = array_fill(0, $b, []);
  $total = 0;
  for ($i = 0; $i < $b; $i++) {
      foreach ($values as $v) {
          foreach ($v as $x) {
              $total += $x;
          }
      }
  }
  return $total;
}
```
2019-11-18 11:54:35 +03:00
Dmitry Stogov 8bf663d3b2 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix $x = (bool)$x; for undefined with opcache
2019-11-18 11:29:38 +03:00
Dmitry Stogov be6fb13873 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix $x = (bool)$x; for undefined with opcache
2019-11-18 11:27:43 +03:00
Dmitry Stogov e72e3370c6 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix $x = (bool)$x; for undefined with opcache
2019-11-18 11:26:30 +03:00