Commit Graph

113813 Commits

Author SHA1 Message Date
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
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
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
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 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
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
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
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
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
Tyson Andre
a2c41c0ea6 Fix $x = (bool)$x; for undefined with opcache
And `$x = !$x`

Noticed while working on GH-4912

The included test would not emit undefined variable errors in php 8.0
with opcache enabled. The command used:

```
php -d zend_extension=opcache.so --no-php-ini -d error_reporting=E_ALL \
    -d opcache.file_cache= -d opcache.enable_cli=1  test.php
```
2019-11-18 11:24:03 +03:00
Jakub Zelenka
29c7c9e8ed Add NEWS entry for bug #76601 fix 2019-11-17 14:52:36 +00:00
Maksim Nikulin
e37bd5dcc2 Do not let PHP-FPM children miss SIGTERM, SIGQUIT
Postpone signal delivery while spawning children.
Prevent the following case:

- Reload (reexec) is in progress.
- New master is forking to start enough children for pools
  where `pm` is not `on-demand`.
- Another `SIGUSR2` is received by the master process.
- Master process switches to reloading state.
- Some child has not set its own signal handlers.
- `SIGQUIT` and `SIGTERM` sent by master process are caught
  by signal handler set by master process and so they are ignored.
- A child is running, it has no reason to finish

Before pull request #4465 this scenario could cause deadlock,
however with 0ed6c37140 reload finishes after `SIGKILL`.

Use sigprocmask() around fork() to avoid race of delivery signal to children
and setting of own signal handlers.

Fixes bug #76601
2019-11-17 14:46:56 +00:00
Nikita Popov
3f4a15113c Handle reallocated root buffer during GC destroy phase
We no longer protect GC during the destroy phase, so we need to
deal with buffer reallocation.

Possible fix for bug #78811.
2019-11-15 15:53:49 +01:00
Derick Rethans
51ac4e302c Zend Engine version is no longer in -dev 2019-11-15 14:27:20 +00:00
Derick Rethans
e99406f4d1 PHP-7.4 is now 7.4.1-dev 2019-11-15 14:22:14 +00:00
Nikita Popov
266f3a02bc Fixed bug #78810 2019-11-15 12:06:17 +01:00
Christoph M. Becker
a5683e65da Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix ASLR related invalid opline handler issues
2019-11-15 09:47:34 +01:00
Christoph M. Becker
39d04f15f8 Fix ASLR related invalid opline handler issues
Opcache stores `opline->handler`s in shared memory.  These pointers are
invalid, if the main PHP DLL is loaded at another base address due to
ASLR.  We therefore store the address of `execute_ex` in the mmap base
file, and check on startup whether it matches its current address.  If
not, we fall back on the file cache if enabled, and bail out otherwise.

This still does not address cases where the opline handler is located
inside of another DLL (e.g. for some profilers, debuggers), but there
seems to be no general solution for now.

(cherry picked from commit 8ba10b8fbc)
2019-11-15 09:46:58 +01:00
Fabien Villepinte
92fd96531c Add more CONFLICTS tags
Closes GH-4908.
2019-11-13 20:59:23 +01:00
Dmitry Stogov
49fcbb4810 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed wrong constant usage
2019-11-12 13:00:27 +03:00
Dmitry Stogov
9083e178f6 Fixed wrong constant usage 2019-11-12 12:59:50 +03:00
Dmitry Stogov
c3f23642da ws 2019-11-12 10:51:55 +03:00
Stanislav Malyshev
686a24c1eb Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug #78804 - Segmentation fault in Locale::filterMatches
2019-11-11 23:08:44 -08:00
Stanislav Malyshev
ea2a125789 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #78804 - Segmentation fault in Locale::filterMatches
2019-11-11 23:08:38 -08:00
Stanislav Malyshev
2c9926f156 Fix bug #78804 - Segmentation fault in Locale::filterMatches 2019-11-11 22:32:35 -08:00
Christoph M. Becker
ce047e6091 Fix test case for Windows 2019-11-11 12:49:32 +01:00
Christoph M. Becker
60081ca20d Fix test cases which fail on Windows debug builds
We use the portable {TMP} instead of the hard-coded /tmp, and skip
mysqli_debug_append.phpt on Windows, because unlinking the trace file
while the connection is still open won't work there.
2019-11-11 12:14:38 +01:00
Dmitry Stogov
ecd0c5b6ad Fixed bug #78714 (funcs returning pointer can't use call convention spec) 2019-11-11 12:07:48 +03:00
Fabien Villepinte
ce41795a9f Fix conflicts in windows ACL tests
Closes GH-4898.
2019-11-09 13:55:42 +01:00
Fabien Villepinte
9c4b989c75 Make test runner runnable without arguments
The default PHP executable was not set when no args were provided.

Closes GH-4894.
2019-11-08 20:33:19 +01:00
Levi Morrison
05bce66037 Merge branch 'PHP-7.3' into PHP-7.4 2019-11-08 08:02:49 -07:00
Levi Morrison
4a55794b98 Wrap php_random.h in C++ portability macros
Also remove portability headers. This goes against the existing
conventions of these files.
2019-11-08 07:58:26 -07:00
Nikita Popov
6ddb381ae5 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Wrap hrtime in `extern "c" {}`
2019-11-07 14:42:11 +01:00
Levi Morrison
b9dfa12853 Wrap hrtime in extern "c" {}
This allows it to be used by C++ extensions without them having to do their own forward declares.

Closes GH-4890.
2019-11-07 14:41:58 +01:00
Nikita Popov
e19f0e86dc Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix php_pcre_mutex_free()
2019-11-07 14:31:55 +01:00
Nikita Popov
6dcc0b859f Fix php_pcre_mutex_free()
We should only set the mutex to NULL if we actually freed it.
Due to missing braces non-main threads may currently set it to
NULL first.
2019-11-07 14:31:19 +01:00
Nikita Popov
aba89f56ff Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Remove outdated comments in test
2019-11-07 14:06:48 +01:00
Nikita Popov
29f4939923 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Remove outdated comments in test
2019-11-07 14:06:33 +01:00
Nikita Popov
ee243bc471 Remove outdated comments in test 2019-11-07 14:06:23 +01:00
Nikita Popov
dacadf5aa3 Disable ifunc resolvers under thread sanitizer as well 2019-11-07 13:08:03 +01:00