1
0
mirror of https://github.com/php/php-src.git synced 2026-04-04 22:52:40 +02:00
Commit Graph

121604 Commits

Author SHA1 Message Date
Dmitry Stogov
990bac4efc Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed memory leak
2020-10-27 01:20:46 +03:00
Dmitry Stogov
a17cec446a Fixed memory leak 2020-10-27 01:20:22 +03:00
Sammy Kaye Powers
6cd0ec70b5 Merge branch 'PHP-8.0'
* PHP-8.0:
  Add missing observer tests
2020-10-26 15:15:45 -07:00
Sammy Kaye Powers
4a6932c076 Add missing observer tests
Closes GH-6378
2020-10-26 15:15:17 -07:00
Dmitry Stogov
9fd5851551 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed register allocation
  Fixed MAY_BE_INDIRECT inference.
2020-10-26 21:49:14 +03:00
Dmitry Stogov
ba525a68d9 Fixed register allocation 2020-10-26 21:48:47 +03:00
Dmitry Stogov
b7df636589 Fixed MAY_BE_INDIRECT inference. 2020-10-26 21:48:13 +03:00
Dmitry Stogov
f663546b2a Merge branch 'PHP-8.0'
* PHP-8.0:
  Better JIT support for aliases
2020-10-26 19:05:23 +03:00
Dmitry Stogov
9d3cc223b2 Better JIT support for aliases 2020-10-26 19:05:08 +03:00
Nikita Popov
18d373e8c3 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix inconsistency in PDO transaction state
2020-10-26 17:01:25 +01:00
Nikita Popov
7b9519a792 Fix inconsistency in PDO transaction state
This addresses an issue introduced by #4996 and reported in
https://bugs.php.net/bug.php?id=80260.

Now that PDO::inTransaction() reports the real transaction state
of the connection, there may be a mismatch with PDOs internal
transaction state (in_tcx). This is compounded by the fact that
MySQL performs implicit commits for DDL queries.

This patch fixes the issue by making beginTransaction/commit/rollBack
work on the real transaction state provided by the driver as well
(or falling back to in_tcx if the driver does not support it).

This does mean that writing something like

    $pdo->beginTransaction();
    $pdo->exec('CREATE DATABASE ...');
    $pdo->rollBack(); // <- illegal

will now result in an error, because the CREATE DATABASE already
committed the transaction. I believe this behavior is both correct
and desired -- otherwise, there is no indication that the code did
not behave correctly and the rollBack() was effectively ignored.
However, this is also a BC break.

Closes GH-6355.
2020-10-26 17:01:18 +01:00
Nikita Popov
94b0204da6 Merge branch 'PHP-8.0'
* PHP-8.0:
  Deny serialization of finfo objects
2020-10-26 16:54:58 +01:00
Nikita Popov
6d3695a217 Deny serialization of finfo objects
The resulting objects were already unusable, make it error out
earlier.
2020-10-26 16:54:30 +01:00
Nikita Popov
4485f10330 Merge branch 'PHP-8.0'
* PHP-8.0:
  Deny cloning of fileinfo objects
2020-10-26 16:52:22 +01:00
Nikita Popov
70388cc0ed Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Deny cloning of fileinfo objects
2020-10-26 16:52:14 +01:00
Nikita Popov
9353f11bd2 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Deny cloning of fileinfo objects
2020-10-26 16:50:48 +01:00
Nikita Popov
7817fc07e1 Deny cloning of fileinfo objects
Using a cloned finfo object will crash.
2020-10-26 16:50:20 +01:00
Nikita Popov
3489e98333 Merge branch 'PHP-8.0'
* PHP-8.0:
  Consistent error handling in mysqli_poll
2020-10-26 16:25:31 +01:00
Dharman
7e6b840778 Consistent error handling in mysqli_poll
This error condition should not actually be reachable, but change
it to be consistent with the other ones.

Also fix a memory leak.

Closes GH-6340.
2020-10-26 16:25:25 +01:00
Christoph M. Becker
0768ccf125 Merge branch 'PHP-8.0'
* PHP-8.0:
  Revert "Fix out-of-bounds write"
2020-10-26 15:42:32 +01:00
Christoph M. Becker
c6784ca75e Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Revert "Fix out-of-bounds write"
2020-10-26 15:42:08 +01:00
Christoph M. Becker
cf5d46ba94 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Revert "Fix out-of-bounds write"
2020-10-26 15:40:55 +01:00
Christoph M. Becker
be6d72b3a4 Revert "Fix out-of-bounds write"
This reverts commit bf6873a18e.

CVE-2020-26159 is bogus; the "bug" was apparently a false positive
reported by Coverity, and the "fix" apparently wrong, see
<https://github.com/kkos/oniguruma/issues/221>.

Closes GH-6357.
2020-10-26 15:40:12 +01:00
Nikita Popov
fa5f083cd9 Merge branch 'PHP-8.0'
* PHP-8.0:
  Re-enable laravel tests
2020-10-26 14:31:55 +01:00
Nikita Popov
8aead9e2bc Re-enable laravel tests
Laravel is now sufficiently PHP 8 compatible.

Closes GH-6353.
2020-10-26 14:31:48 +01:00
Dmitry Stogov
55c5763be5 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed incorrect register allocation in ext/gd/tests/imagecopyresampled_variation1.phpt
2020-10-26 15:57:23 +03:00
Dmitry Stogov
0fa154ad8d Fixed incorrect register allocation in ext/gd/tests/imagecopyresampled_variation1.phpt 2020-10-26 15:56:37 +03:00
Christoph M. Becker
838671dd43 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #80268: loadHTML() truncates at NUL bytes
2020-10-26 13:15:33 +01:00
Christoph M. Becker
e71036ce03 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #80268: loadHTML() truncates at NUL bytes
2020-10-26 13:15:03 +01:00
Nikita Popov
3fb6e3a887 Merge branch 'PHP-8.0'
* PHP-8.0:
  Don't set xdebug.default_enable in run-tests
2020-10-26 13:11:00 +01:00
bashkarev
f17b2a75a5 Don't set xdebug.default_enable in run-tests
This throws a deprecation warning in XDebug 3.

Closes GH-6324.
2020-10-26 13:10:26 +01:00
Christoph M. Becker
7bc1c0cca8 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80268: loadHTML() truncates at NUL bytes
2020-10-26 13:09:30 +01:00
Christoph M. Becker
6d2bc72530 Fix #80268: loadHTML() truncates at NUL bytes
libxml2 has no particular issues parsing HTML strings with NUL bytes;
these just cause truncation of the current text content, but parsing
continues generally.  Since `::loadHTMLFile()` already supports NUL
bytes, `::loadHTML()` should as well.

Note that this is different from XML, which does not allow any NUL
bytes.

Closes GH-6368.
2020-10-26 13:08:05 +01:00
Nikita Popov
18c4408fa5 Merge branch 'PHP-8.0'
* PHP-8.0:
  Declare may_retry_reparse_point on windows only
2020-10-26 12:41:19 +01:00
Nikita Popov
26bd857999 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Declare may_retry_reparse_point on windows only
2020-10-26 12:41:12 +01:00
Nikita Popov
31aca85572 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Declare may_retry_reparse_point on windows only
2020-10-26 12:40:56 +01:00
Nikita Popov
824cbc2781 Declare may_retry_reparse_point on windows only 2020-10-26 12:40:45 +01:00
Nikita Popov
e0ea3e8a01 Remove dated results from ext/hash/bench.php
These are not exactly representative anymore.
2020-10-26 12:25:00 +01:00
Christoph M. Becker
820ac06b6c Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #62474: com_event_sink crashes on certain arguments
2020-10-26 11:55:46 +01:00
Christoph M. Becker
2da00fadc8 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #62474: com_event_sink crashes on certain arguments
2020-10-26 11:55:29 +01:00
Christoph M. Becker
f9ba2ca136 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #62474: com_event_sink crashes on certain arguments
2020-10-26 11:54:45 +01:00
Christoph M. Becker
7424bfc7ac Fix #62474: com_event_sink crashes on certain arguments
We have to make sure that the variant is of type `VT_DISPATCH` before
we access it as such.

Closes GH-6372.
2020-10-26 11:48:57 +01:00
Christoph M. Becker
f4b0b32e2d Raise E_WARNING on PHP related errors
If Zip operations fails due to PHP error conditions before libzip even
has been called, there is no meaningful indication what failed; the
functions just return false, and the Zip status indicated that no error
did occur.  Therefore we raise `E_WARNING` in these cases.

Closes GH-6356.
2020-10-26 11:40:06 +01:00
Christoph M. Becker
ed64d1b5a9 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #80258: Windows Deduplication Enabled, randon permission errors
2020-10-26 11:22:55 +01:00
Christoph M. Becker
0abcb9fb69 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #80258: Windows Deduplication Enabled, randon permission errors
2020-10-26 11:22:39 +01:00
Christoph M. Becker
ac2e9587fb Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80258: Windows Deduplication Enabled, randon permission errors
2020-10-26 11:21:52 +01:00
Christoph M. Becker
848e24f24d Fix #80258: Windows Deduplication Enabled, randon permission errors
A recent bug fix regarding symlinks claimed:

> After resolving reparse points, the path still may be a reparse
> point; in that case we have to resolve that reparse point as well.

While that is basically correct, some reparse points may point to
inaccessible system folders (e.g. `IO_REPARSE_TAG_DEDUP` points to
"\System Volume Information").  Since we don't know details about
arbitrary reparse points, and are mainly interested in nested symlinks,
we take a step back, and only resolve `IO_REPARSE_TAG_SYMLINK` for now.

Close GH-6354.
2020-10-26 11:21:14 +01:00
Christoph M. Becker
02632a5080 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #80280: ADD_EXTENSION_DEP() fails for ext/standard and ext/date
2020-10-26 11:06:25 +01:00
Christoph M. Becker
b678df5dc8 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #80280: ADD_EXTENSION_DEP() fails for ext/standard and ext/date
2020-10-26 11:06:10 +01:00
Christoph M. Becker
8b59e4e897 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80280: ADD_EXTENSION_DEP() fails for ext/standard and ext/date
2020-10-26 11:05:22 +01:00