Commit Graph

5459 Commits

Author SHA1 Message Date
Nikita Popov
b3cc30adf8 Increase select timeout in FPM tester
Let's see if that helps with the recent failure spree on Azure.
2020-01-09 10:19:02 +01:00
Nikita Popov
d5f26de63d Merge branch 'PHP-7.4'
* PHP-7.4:
  Revert "Display a message if select in FPM test timeouts"
2020-01-08 16:32:00 +01:00
Nikita Popov
4b860c06ed Revert "Display a message if select in FPM test timeouts"
This reverts commit e2361498d5.

Ooops, this occurs normally during some tests, but I didn't notice
because I have slow tests disabled...
2020-01-08 16:31:33 +01:00
Nikita Popov
c669a1a4da Merge branch 'PHP-7.4'
* PHP-7.4:
  Display a message if select in FPM test timeouts
2020-01-08 15:57:21 +01:00
Nikita Popov
e2361498d5 Display a message if select in FPM test timeouts 2020-01-08 15:57:05 +01:00
Máté Kocsis
e1b57310b1
Use RETURN_THROWS() during ZPP in main, sapi, win32, and Zend 2019-12-30 17:38:10 +01:00
Christoph M. Becker
1ab9d626d1 Fix typo 2019-12-30 17:21:50 +01:00
Christoph M. Becker
dabc28d182 Fix #78880: Spelling error report
We fix the most often occuring typos according to a recent codespell
report[1] in tests, code comments and documentation.

[1] <https://fossies.org/linux/test/php-src-master-f8f48ce.191129.tar.gz/codespell.html>.
2019-12-21 11:58:00 +01:00
Nikita Popov
7df8f952ae Further reduce parse depth limit in mbstring fuzzer
Depth limit of 1024 still causes optimize_node stack overflows
when running under asan.
2019-12-14 22:43:15 +01:00
Nikita Popov
9de4f87aca Limit parse depth in mbstring fuzzer
The default depth of 4096 is large enough to cause optimize_node
stack overflows under asan. Reduce to 1024.
2019-12-13 16:09:28 +01:00
ekinhbayar
a74484cc98 Remove phpdbg README
phpdbg documentation has been moved to PHP manual and the link at the
bottom of this README is dead, so the file can be removed.
2019-12-09 17:32:17 +01:00
Jakub Zelenka
d98df5b6c6 Merge branch 'PHP-7.4' 2019-12-08 17:58:59 +00:00
Jakub Zelenka
ac042f839f Fix bug #78916 (php-fpm 7.4.0 don't send mail via mail()) 2019-12-08 17:57:17 +00:00
Jakub Zelenka
2a742546bf Merge branch 'PHP-7.4' 2019-12-01 17:17:30 +00:00
Jakub Zelenka
67cd4271e9 Fix bug #78889 (php-fpm service fails to start) 2019-12-01 17:13:20 +00: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
Craig Duncan
e208d236b3 Convert apache2handler arginfo to php stubs 2019-11-18 15:07:04 +01:00
Jakub Zelenka
f826bbde93 Merge branch 'PHP-7.4' 2019-11-17 14:53:53 +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
Máté Kocsis
27e83d0fb8
Add union return types for function stubs 2019-11-11 14:54:55 +01:00
Nikita Popov
ac4e0f0852 Make zend_type a 2-field struct
We now store the pointer payload and the type mask separately. This
is in preparation for union types, where we will be using both at
the same time.

To avoid increasing the size of arginfo structures, the
pass_by_reference and is_variadic fields are now stored as part of
the type_mask (8-bit are reserved for custom use).

Different types of pointer payloads are distinguished based on bits
in the type_mask.
2019-11-08 15:15:48 +01:00
Fabien Villepinte
a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00
Nikita Popov
11649a6d77 Reduce size limit in parser fuzzer
Avoid stack overflows during compilation of deeply nested
expressions.
2019-11-07 21:20:34 +01:00
Nikita Popov
991a0250b5 Reduce oniguruma retry limit in fuzzer
For some patterns matching may take quite long even at retry limit
100000 and it seems that this is not easy to fix on the oniguruma
side.

Reduce the retry limit by another factor of 10 in hope of reducing
timeouts.
2019-11-02 10:40:41 +01:00
Máté Kocsis
ad9ea5abde Add stubs for various standard functions
Closes GH-4851.
2019-10-30 10:34:06 +01:00
Craig Duncan
1d631c18de Convert phpdbg arginfo to php stubs
Closes GH-4867.
2019-10-29 11:39:58 +01:00
Nikita Popov
1c9cbc911d Small phpdbg cleanups
Add a zpp_none() call, convert E_ERROR to ValueError.
2019-10-29 11:39:02 +01:00
Stanislav Malyshev
6bef57f2e2 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix bug #78599 (env_path_info underflow can lead to RCE) (CVE-2019-11043)
  bump versions after release
  set versions for release
2019-10-21 13:17:32 -07:00
Stanislav Malyshev
59953efc09 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug #78599 (env_path_info underflow can lead to RCE) (CVE-2019-11043)
  bump versions after release
  set versions for release
2019-10-21 13:17:27 -07:00
Stanislav Malyshev
57b4dcbe77 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #78599 (env_path_info underflow can lead to RCE) (CVE-2019-11043)
  bump versions after release
  set versions for release
2019-10-21 13:17:19 -07:00
Stanislav Malyshev
4b5cdda0c7 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #78599 (env_path_info underflow can lead to RCE) (CVE-2019-11043)
  bump versions after release
  set versions for release
2019-10-21 13:17:09 -07:00
Jakub Zelenka
ab061f95ca Fix bug #78599 (env_path_info underflow can lead to RCE) (CVE-2019-11043) 2019-10-20 22:50:04 -07:00
Jakub Zelenka
878f8b0b23 Merge branch 'PHP-7.4' 2019-10-20 16:59:30 +01:00
Maksim Nikulin
d537ae73e0 Skip fpm bug #74083 test on Windows
Have not expected side effects of `include`.
2019-10-20 16:08:55 +01:00
Maksim Nikulin
2f9f409156 Add (slow) test for fpm concurrent reloads #74083 2019-10-20 16:08:55 +01:00
Maksim Nikulin
ae5154c6c6 Block signals during fpm master initialization
Fix PHP-FPM failure in the case of concurrent reload attempts.

Postpone signal delivery to the fpm master process till proper signal
handlers are set. Prevent the following case:

- Running master process receives `SIGUSR2` and performs `execvp()`.
- Another `SIGUSR2` is arrived before signal handlers are set.
- Master process dies.
- Requests to the HTTP server handled by PHP-fpm can not be served
  any more.

Block some signals using `sigprocmask()` before `execvp()` and early
in the `main()` function. Unblock signals as soon as proper
handlers are set.

Fixes bug #74083
2019-10-20 16:08:55 +01:00
Christoph M. Becker
0436bc875e Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix miscellaneous typos in docs
2019-10-19 19:20:25 +02:00
Tyson Andre
38f388fba4 Fix miscellaneous typos in docs 2019-10-19 19:19:28 +02:00
Christoph M. Becker
273731fb76 Add Zend class/interface arginfo stubs
We also change `Generator::throw()` to expect a `Throwable` in the
first place, and we now throw a TypeError instead of returning `false`
from `Exception::getTraceAsString()`.
2019-10-15 16:21:00 +02:00
Nikita Popov
db233501ff Use clean shutdown on uncaught exception 2019-10-11 12:41:15 +02:00
Dmitry Stogov
b64a182233 Revert "Link executable files using non PIC object files. This reduces PIC overhead and improves performance."
This reverts commit eef85229d0.
2019-10-10 16:28:59 +03:00
Nikita Popov
f1aff654be Use php stream in exif fuzzer
This has the main benefit that we don't go through the
realpath cache, which will cause leak checking to be
disabled.
2019-10-10 12:33:15 +02:00
Nikita Popov
bd21e202b9 Reduce oniguruma limits in fuzzing sapi
The defaults are fairly conservative and may still take quite a
bit to match a single expression. Reduce them by a factor of 10x
to speed up fuzzing.
2019-10-08 17:38:49 +02:00
Fabien Villepinte
76c8f2ed34 Fix regex in generate_parser_corpus.php
The next section after --FILE-- is not necessarily --EXPECT--.
Accept any section.

Closes GH-4770.
2019-10-02 16:56:41 +02:00
Nikita Popov
872a759f88 Limit input size in exif fuzzer
Probably still too much...
2019-10-01 18:29:23 +02:00
Nikita Popov
4d49ec208e Add --enable-fuzzer-msan flag
To build fuzzers with memory sanitizer.
2019-10-01 13:04:47 +02:00
Nikita Popov
15761ef359 Pass mode to open() in exif fuzzer
Funny how despite all those sanitizers running, nothing ever
caught this...
2019-09-30 18:23:47 +02:00
Nikita Popov
235983dfde Merge branch 'PHP-7.4' 2019-09-30 17:52:39 +02:00
Fabien Villepinte
0aa3acc6c4 Fix borked SKIPIFs 2019-09-30 17:51:41 +02:00
Nikita Popov
b442a9b69b Merge branch 'PHP-7.4' 2019-09-30 12:54:45 +02:00
Nikita Popov
27f5785363 Merge branch 'PHP-7.3' into PHP-7.4 2019-09-30 12:54:18 +02:00
Sergei Turchanov
e546d721e8 Fix #78413: php-fpm request_terminate_timeout does not take effect after fastcgi_finish_request
To retain legacy behavior I decided to add an option to control request
termination logic. If request_terminate_timeout_track_finished is set,
then request will be tracked for time limits even after
fastcgi_finish_request was called.

This patch depends on the fix provided in BUG 78469 (otherwise php-fpm
workers listening on named pipes on Windows will be erroneously terminated)
(PR #4636)
2019-09-30 12:54:09 +02:00
Nikita Popov
61f8f68a79 Make fuzzing sapi i386 compatible
* Avoid an unnecessary -lstdc++ dependency. It's not going to be
   used in the end anyway, and is an unnecessary hassle to set up.
 * Use $LIB_FUZZING_ENGINE instead of hardcoding -lFuzzingEngine.
2019-09-27 23:58:48 +02:00
Nikita Popov
31ff9f3e29 Merge branch 'PHP-7.4' 2019-09-27 11:20:48 +02:00
Nikita Popov
f2826954ac XFAIL sapi/fpm/tests/log-bwd-multiple-msgs-stdout-stderr.phpt
This is supposed to be addressed by GH-4007, but that seems stalled
for now.
2019-09-27 11:18:50 +02:00
Nikita Popov
7e295da81c Limit max length for parser fuzzer
We're getting some very large inputs (~500KB) on OSS-Fuzz, which
slot down performance a lot. Let's try limiting this, starting
with a still fairly large value of 64KB.

Also remove the max_execution_time limit, so that slow test cases
cause a genuine libfuzzer timeout and we may investigate them.
2019-09-26 10:45:47 +02:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Nikita Popov
1fe47ad233 Add new entries for exif and unserialize fuzzing corpus 2019-09-24 12:34:30 +02:00
Nikita Popov
8d7911ef56 Standardize type printing in reflection
Use ?T instead of "T or NULL".
2019-09-23 15:40:03 +02:00
Nikita Popov
418d243e37 Change instructions to use oniguruma from git
Some bugs are already fixed there.

[ci skip]
2019-09-18 14:56:25 +02:00
Nikita Popov
d7b4cdff3f Add instructions for building an instrumented libonig
[ci skip]
2019-09-18 12:49:42 +02:00
Nikita Popov
f613e32058 Merge branch 'PHP-7.4' 2019-09-17 12:19:57 +02:00
Nikita Popov
1a5f04688e Merge branch 'PHP-7.3' into PHP-7.4 2019-09-17 12:19:45 +02:00
Nikita Popov
3a2fa489dd Merge branch 'PHP-7.2' into PHP-7.3 2019-09-17 12:19:39 +02:00
Drakano
252ebce0d7 Add tilde to allowed status/ping path
Because of user specific webdirs it should be possible to set a
status/ping path like "/~username/status".

Closes GH-4698.
2019-09-17 12:19:21 +02:00
Nikita Popov
c1adb7a74e Move scripts out of corpus/ directory 2019-09-16 20:18:29 +02:00
Nikita Popov
c4e2ca607f Various improvements to fuzzer SAPIs 2019-09-16 16:04:10 +02:00
Stanislav Malyshev
41f45647f9 Add fuzzer SAPIs to the core 2019-09-16 16:04:09 +02:00
Nikita Popov
a86e04876b Merge branch 'PHP-7.4' 2019-09-14 00:25:39 +02:00
Nikita Popov
fa07a9c223 Fix symtable_cache_limit assignment in phpdbg
The meaning of the limit changed in 7.4, it now points one past the
end. Adjust code accordingly.
2019-09-14 00:25:07 +02:00
Dmitry Stogov
eef85229d0 Link executable files using non PIC object files. This reduces PIC overhead and improves performance. 2019-09-07 11:59:11 +03:00
Dmitry Stogov
64b2ee606c Merge branch 'non_pic'
* non_pic:
  Link executable files using non PIC object files. This reduces PIC overhead and improves performance.
2019-09-06 11:45:43 +03:00
Nikita Popov
edf5896a4e Merge branch 'PHP-7.4' 2019-09-05 18:29:30 +02:00
Nikita Popov
9ec61e43d4 Fix pipe detection and stream position handling
There are two related changes here:
1. Also check for S_ISCHR/FILE_TYPE_CHAR when checking for pipes, so
   that we detect ttys as well, which are also not seekable.
2. Always set position=-1 (i.e. ftell will return false) when a pipe
   is detected. Previously position=0 was sometimes used, depending on
   whether we're on Windows/Linux and whether the FD or FILE codepath
   was used.
2019-09-05 18:29:15 +02:00
Dmitry Stogov
56e880af9f Link executable files using non PIC object files. This reduces PIC overhead and improves performance. 2019-09-03 23:42:22 +03:00
Nikita Popov
be8247101d Merge branch 'PHP-7.4' 2019-08-30 11:02:40 +02:00
Nikita Popov
b4088ba509 Avoid accessing undefined index in CLI server test 2019-08-30 11:02:30 +02:00
Nikita Popov
226fd52c76 Don't call Reflection::export() in --rf etc implementation
This method is deprecated ... instead simply directly print the
object.
2019-08-30 11:02:28 +02:00
Jakub Zelenka
71e2c97ffb Merge branch 'PHP-7.4' 2019-08-26 18:12:35 +01:00
Jakub Zelenka
302a1400f3 Merge branch 'PHP-7.3' into PHP-7.4 2019-08-26 18:11:04 +01:00
Tsuyoshi Sadakata
ffcf57fa18 Fix bug #78334 (fpm log prefix message includes wrong stdout/stderr notation) 2019-08-26 18:05:11 +01:00
Nikita Popov
51ea7fc477 Merge branch 'PHP-7.4' 2019-08-23 17:01:49 +02:00
Nikita Popov
7910f128e2 Fix noalias violation in select call 2019-08-23 16:18:59 +02:00
Yusuke Kawasaki
7602169d7c Fix typo: environement [ci skip] 2019-08-17 12:41:53 +02:00
zhdaniel
844b261e3a Fix typo 2019-08-15 09:32:35 +02:00
Stephen Reay
66b750d07e Add stubs for PCRE extension
Closes GH-4501.
2019-08-11 12:46:42 +02:00
Nikita Popov
2b1073eb19 Merge branch 'PHP-7.4' 2019-07-30 10:19:01 +02:00
Nikita Popov
0ed6c37140 Fix FPM timer event re-registration
Make sure that fpm_event_add calls inside a timer callback work by
unregistering the event from the queue before invoking its callback.

The read timeout in tester.inc is increased because the added test
needs two seconds (one for SIGTERM, one for SIGKILL) until the
reload succeeds, so we should wait longer than that for a response.
2019-07-30 10:16:57 +02:00
Peter Kokot
9af6d5545a Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove AC_FPM_POLL
2019-07-24 22:04:24 +02:00
Peter Kokot
a3169964c0 Remove AC_FPM_POLL
AC_FPM_POLL defines HAVE_POLL symbol which is already checked by
configure.ac and function poll in AC_CHECK_FUNCTIONS.

Closes GH-4449
2019-07-24 22:03:47 +02:00
Nikita Popov
0fcd017340 Merge branch 'PHP-7.4' 2019-07-24 12:07:04 +02:00
David Carlier
b05f364333 Fix bindpath mem leak in cgi
Closes GH-4451.
2019-07-24 12:06:40 +02:00
Nikita Popov
173ebe4c44 Merge branch 'PHP-7.4' 2019-07-24 10:44:40 +02:00
Nikita Popov
d9680272c7 Revert "Drop free_filename field from zend_file_handle"
This reverts commit e0eca26285.

free_filename is used by the wincache extension, restore this
field for PHP 7.4.
2019-07-24 10:43:37 +02:00
Nikita Popov
a1e2c8870e Merge branch 'PHP-7.4' 2019-07-22 17:26:01 +02:00
Nikita Popov
d59aac58b3 Report errors from stream read and write operations
The php_stream_read() and php_stream_write() functions now return
an ssize_t value, with negative results indicating failure. Functions
like fread() and fwrite() will return false in that case.

As a special case, EWOULDBLOCK and EAGAIN on non-blocking streams
should not be regarded as error conditions, and be reported as
successful zero-length reads/writes instead. The handling of EINTR
remains unclear and is internally inconsistent (e.g. some code-paths
will automatically retry on EINTR, while some won't).

I'm landing this now to make sure the stream wrapper ops API changes
make it into 7.4 -- however, if the user-facing changes turn out to
be problematic we have the option of clamping negative returns to
zero in php_stream_read() and php_stream_write() to restore the
old behavior in a relatively non-intrusive manner.
2019-07-22 17:17:28 +02:00
Nikita Popov
a9969ec1bd Merge branch 'PHP-7.4' 2019-07-22 12:41:20 +02:00
Nikita Popov
72b9105d30 Merge branch 'PHP-7.3' into PHP-7.4 2019-07-22 12:41:15 +02:00
Nikita Popov
b59a9381b9 Remove test for bug #77185
Seems to be very unreliable in CI.
2019-07-22 12:40:26 +02:00
Nikita Popov
8092604ec2 Merge branch 'PHP-7.4' 2019-07-22 11:19:32 +02:00
Nikita Popov
b2915fc332 Merge branch 'PHP-7.3' into PHP-7.4 2019-07-22 11:19:24 +02:00
Nikita Popov
5e4dbce586 Reduce number of workers in test
4 seems to be enough to reliably reproduce the issue. Let's see
if this works better in CI.
2019-07-22 11:18:38 +02:00
Nikita Popov
a16ca769af Merge branch 'PHP-7.4' 2019-07-22 10:34:58 +02:00
Nikita Popov
97b80bd83b Merge branch 'PHP-7.3' into PHP-7.4 2019-07-22 10:34:32 +02:00
Maksim Nikulin
bdf24f8d6d Prevent use after free in fpm_event_epoll_wait
epoll event backend does not guarantee that child input/output events
are reported before SIGCHILD due to finished worker. While a bunch of
events received by epoll is being processed, child-related structures
may be removed before dispatching of an I/O event for the same child.
The result may be attempt to access to memory region allocated for
another purpose, segfault of the master process, and unavailable web
sites.

Postpone processing of SIGCHILD events till other events in the same
bunch are processed.

Fix Bug #62418 php-fpm master process crashes
Fix Bug #65398 Race condition between SIGCHLD and child stdout/stderr event leads to segfault
Fix Bug #75112 php-fpm crashing, hard to reproduce
Fix Bug #77114 php-fpm master segfaults in fpm_event_epoll_wait/fpm_event_fire
Fix Bug #77185 Use-after-free in FPM master event handling
2019-07-22 10:32:58 +02:00
George Wang
e4f6744552 Merge branch 'PHP-7.4' 2019-07-21 00:02:03 -04:00
George Wang
30de357fa1 Merge branch 'PHP-7.3' into PHP-7.4 2019-07-21 00:01:39 -04:00
George Wang
82f35ab089 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-21 00:01:06 -04:00
George Wang
eb7e45f662 Checked in LiteSpeed SAPI 7.5, addressed two main problems in "clean shutdown" introduced in 7.4.3,
1. falls in an infinite loop because PHP engine's inconsistent state, now override the ITIMER_PROF to 0.1 second, clean shutdown must finish before that.
2. generate too much error log, we completely disable "error_reporting" before calling php_request_shutdown().
2019-07-20 23:59:43 -04:00
Nikita Popov
eb766751dc Merge branch 'PHP-7.4' 2019-07-19 10:06:30 +02:00
rjhdby
d574df63dc Deprecate alternative array access syntax
RFC: https://wiki.php.net/rfc/deprecate_curly_braces_array_access
2019-07-19 10:06:10 +02:00
Peter Kokot
f33d12096d Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove duplicate socklen_t check
2019-07-18 12:11:45 +02:00
Peter Kokot
bbdbc2658c Remove duplicate socklen_t check
- Use Autoconf's default AC_CHECK_TYPES

Closes GH-4418
2019-07-18 12:11:19 +02:00
Nikita Popov
b32e9a9227 Merge branch 'PHP-7.4' 2019-07-17 10:41:34 +02:00
Nikita Popov
a986e70991 Avoid double buffering in Zend streams
Disable buffering in PHP streams, to avoid storing and copying the
file contents twice.

This will call stream_set_option() on custom stream wrapper as
well, so the method needs to be implemented to avoid a warning.
2019-07-17 10:40:04 +02:00
Nikita Popov
c4a6998c62 Merge branch 'PHP-7.4' 2019-07-16 17:45:03 +02:00
Nikita Popov
b317f0eb59 Remove ZEND_HANDLE_MAPPED
The buf/len members are now simply used in addition to the main
stream, without changing the handle kind.
2019-07-16 17:44:32 +02:00
Nikita Popov
e0eca26285 Drop free_filename field from zend_file_handle
free_filename was always zero.
2019-07-16 17:07:26 +02:00
Nikita Popov
3faa903d47 Merge branch 'PHP-7.4' 2019-07-16 16:44:46 +02:00
Nikita Popov
49bac9b77b Introduce zend_stream_init_filename()
Avoid more ad-hoc initialization of zend_file_handle structures.
2019-07-16 16:44:37 +02:00
Nikita Popov
46faf8f018 Introduce zend_stream_init_fp() API
Reduce the amount of code that mucks around with zend_file_handle
initialization.
2019-07-16 16:44:37 +02:00
Nikita Popov
c562d71d12 Merge branch 'PHP-7.4' 2019-07-16 11:11:08 +02:00
Nikita Popov
ebfa05677b Merge branch 'PHP-7.3' into PHP-7.4 2019-07-16 11:11:00 +02:00
Nikita Popov
eea9d61763 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-16 11:10:51 +02:00
Nikita Popov
8a19fe29de Fixed bug #78297 2019-07-16 11:09:17 +02:00
Nikita Popov
9207aef60c Merge branch 'PHP-7.4' 2019-07-15 16:26:25 +02:00
Nikita Popov
c5f1b384b5 Move shebang handling into the lexer
Instead of handling shebang lines by adjusting the file pointer in
individual SAPIs, move the handling into the lexer, where this is
both a lot simpler and more robust. Whether the shebang should be
skipped is controlled by CG(skip_shebang) -- we might want to do
that in more cases.

This fixed bugs #60677 and #78066.
2019-07-15 16:25:49 +02:00
Nikita Popov
74bf7bfb88 Merge branch 'PHP-7.4' 2019-07-11 15:49:02 +02:00
Nikita Popov
17f7fb7605 Switch to using shell-less proc_open() in various server tests 2019-07-11 15:48:10 +02:00
Nikita Popov
bbd12b3d30 Merge branch 'PHP-7.4' 2019-07-10 11:11:30 +02:00
Nikita Popov
dfe5fd2a37 Avoid invalid array access in fcgi.inc 2019-07-10 11:09:34 +02:00
Nikita Popov
5f0c8f5e30 Merge branch 'PHP-7.4' 2019-07-09 16:20:12 +02:00
David Carlier
aa0e29a668 CGI: Fix memory leak on error paths 2019-07-09 16:19:41 +02:00
Peter Kokot
35709b56e4 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove some more Apache 1 left overs
2019-07-07 12:10:59 +02:00
Peter Kokot
49cc2a63b3 Remove some more Apache 1 left overs
- warning in configure.ac is relevant for the sapi/apache
- errors output redirected to /dev/null when checking Apache version
2019-07-07 12:09:19 +02:00
George Wang
dfce767a62 Merge branch 'PHP-7.4' 2019-07-04 12:15:25 -04:00
George Wang
6a403504e7 Merge branch 'PHP-7.3' into PHP-7.4 2019-07-04 12:14:48 -04:00
George Wang
3ec8776940 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-04 12:04:08 -04:00
George Wang
32af676bd9 Updated to LiteSpeed SAPI V7.4.3
Increased response header count limit from 100 to 1000.
Added crash handler to cleanly shutdown PHP request.
Added CloudLinux mod_lsapi mode
Fixed bug #76058
2019-07-04 12:03:21 -04:00
Joe Watkins
f1f63c0cec
Merge branch 'PHP-7.4'
* PHP-7.4:
  improvements to cli server
2019-07-03 16:31:55 +02:00
Joe Watkins
30019f47a5
improvements to cli server 2019-07-03 16:30:51 +02:00
Nikita Popov
fe2aca83ce Merge branch 'PHP-7.4' 2019-07-01 16:14:58 +02:00
Nikita Popov
af3e2d3186 Initialize last_line in phpdbg globals 2019-07-01 16:14:45 +02:00
Joe Watkins
22fb96ab85
Merge branch 'PHP-7.4'
* PHP-7.4:
  implement support for workers in cli-server on platforms supporting fork
2019-06-29 05:28:12 +02:00
Joe Watkins
82effb3fc7
implement support for workers in cli-server on platforms supporting fork 2019-06-29 05:27:35 +02:00
Nikita Popov
8f0729cb65 Merge branch 'PHP-7.4' 2019-06-28 17:47:45 +02:00
Nikita Popov
45ab57339e Use strcmp() in phpdbg_eol_global_update
memcmp() only makes sense on equal length strings, and here we don't
know anything about the length of the input.
2019-06-28 17:24:30 +02:00
Nikita Popov
cf29c0f212 Remove phpdbg_xml_asprintf()
Clang doesn't like the use of promoted zend_bool in va_start. As
the function isn't used anyway, I'm simply dropping it...
2019-06-28 16:59:52 +02:00
Nikita Popov
b98c148f78 Merge branch 'PHP-7.4' 2019-06-28 15:05:00 +02:00
Nikita Popov
54dd762f59 Set up asan+ubsan scheduled build on azure
Also adds an --asan flag to run-tests.php to setup all the necessary
environment variables. Some tests are marked as skipped because they
are incompatible with asan or too slow.

I'm basing this on the DEBUG_ZTS build, which seems to give us the
most mileage.
2019-06-28 15:00:54 +02:00
Nikita Popov
0a0ca984f0 Merge branch 'PHP-7.4' 2019-06-28 14:48:08 +02:00
Nikita Popov
50cce5eb4f Avoid reliance on arena details on phpdbg oplog
Instead of guessing what the address of the first arena allocation
is going to be, embed the sentinel in the oplog_list structure
directly.
2019-06-28 14:47:42 +02:00
Joe Watkins
b98cd0719a
Merge branch 'PHP-7.4'
* PHP-7.4:
  implement tsrm_is_shutdown API
2019-06-28 10:27:39 +02:00
Joe Watkins
68485f8ab4
implement tsrm_is_shutdown API 2019-06-28 10:27:19 +02:00
Christoph M. Becker
0504f04591 Merge branch 'PHP-7.4'
* PHP-7.4:
  Use the portable zend_strndup() instead of strndup()
2019-06-28 10:24:15 +02:00
Christoph M. Becker
bc0db8ce45 Use the portable zend_strndup() instead of strndup() 2019-06-28 10:23:38 +02:00
Nikita Popov
aa8d70f309 Merge branch 'PHP-7.4' 2019-06-28 09:19:49 +02:00
Nikita Popov
8c4d199851 Fix init_file leak in phpdbg 2019-06-28 09:17:26 +02:00
Nikita Popov
5918171f95 Merge branch 'PHP-7.4' 2019-06-27 14:21:49 +02:00
Nikita Popov
c3132781ec Fix phpdbg shutdown order
In particular, make sure that everything using zmm is released
before zmm is shut down. phpdbg currently gets away with this,
because either a) its custom handlers are used and no auto-free
happens or b) the system allocator is used and no auto-free happens.
With the tracking allocator for asan this no longer works.
2019-06-27 14:20:51 +02:00
Nikita Popov
2149ed7072 Don't use zmm for PHPDBG_G(exec)
Uses system allocator when backing up settings ... let's avoid
unnecessary confusion.
2019-06-27 14:20:30 +02:00
Peter Kokot
6bfa6bff0b Merge branch 'PHP-7.4'
* PHP-7.4:
  Clean headers checks
2019-06-27 02:45:31 +02:00
Peter Kokot
2079b09854 Clean headers checks
Some headers were checked multiple times in the main configure.ac file
and in the bundled extensions or SAPIs themselves. Also many of these
checks are then used accross other extensions or SAPIs so a central
configure.ac makes most sense for these checks.
2019-06-27 02:45:09 +02:00
Nikita Popov
ac749b126f Merge branch 'PHP-7.4' 2019-06-26 11:43:30 +02:00
Nikita Popov
698dd32b03 Fix fpm limit_extensions leak
The logic here is somewhat ugly because the worker pool structure
gets freed early, so we need to explicitly transfer ownership.
2019-06-26 11:40:39 +02:00
Nikita Popov
a1479fbbd9 Merge branch 'PHP-7.4' 2019-06-25 14:30:24 +02:00
Nikita Popov
42b22d3a94 Fix out of bounds write in phpdbg
It seems that this code has a peculiar interpretation of "len",
where it actually points to the last character, not one past it.
So we need +1 here for that extra char and another +1 for the
terminating null byte.
2019-06-25 14:28:58 +02:00
Christoph M. Becker
5120e4a133 Merge branch 'PHP-7.4'
* PHP-7.4:
  Split test case
2019-06-24 14:08:30 +02:00
Christoph M. Becker
94df6dc3fd Split test case
This test is failing on AppVeyor almost all of the time, so splitting
it seems appropriate.  This also allows us to rid php_cli_server_stop()
which was only used by this test case.
2019-06-24 14:08:11 +02:00
Nikita Popov
e4371ef158 Merge branch 'PHP-7.4' 2019-06-21 17:01:47 +02:00
Nikita Popov
152ccfb08d Fix stack leak in phpdbg 2019-06-21 17:01:25 +02:00
Nikita Popov
a7bcfee9c9 Fix prompt leak in phpdbg 2019-06-21 17:01:18 +02:00
Joe Watkins
089e45c91a
Merge branch 'PHP-7.4'
* PHP-7.4:
  refactor a little more to add some more useful error messages and raise the limits on waiting for slow machines
2019-06-19 11:42:02 +02:00
Joe Watkins
eda5d8afcf
refactor a little more to add some more useful error messages and raise the limits on waiting for slow machines 2019-06-19 11:41:24 +02:00
Joe Watkins
0cf3034af1
Merge branch 'PHP-7.4'
* PHP-7.4:
  Separate check for process creation and ability to accept connections
2019-06-19 11:09:48 +02:00
Joe Watkins
d6480fa231
Separate check for process creation and ability to accept connections 2019-06-19 11:09:26 +02:00
Nikita Popov
80e4a6aaef Merge branch 'PHP-7.4' 2019-06-17 13:31:11 +02:00
Freddie Leeman
482784284a Simplify pm.start_servers calculation in docs
This makes it more obvious that this is just the average.
2019-06-17 13:24:22 +02:00
Joe Watkins
7f0a52e07d
Merge branch 'PHP-7.4'
* PHP-7.4:
  bugs in fpm logging #4273 #4007
2019-06-17 07:49:28 +02:00
Joe Watkins
116d42d990
bugs in fpm logging #4273 #4007 2019-06-17 07:48:37 +02:00
Joe Watkins
956db0cdc2
Merge branch 'PHP-7.4'
* PHP-7.4:
  fix mac tests on azure
2019-06-14 12:58:13 +02:00
Joe Watkins
dd10bf5450
Merge branch 'mac-tests' into PHP-7.4
* mac-tests:
  fix mac tests on azure
2019-06-14 12:56:08 +02:00
Joe Watkins
f16b012116
fix mac tests on azure 2019-06-14 12:55:00 +02:00
Nikita Popov
646b64b119 Fix skipif syntax errors
Apparently I did this only on masster...
2019-06-14 09:29:14 +02:00
twosee
61f78de486 Constify some char* arguments or return values of ZEND_API
Closes GH-4247.
2019-06-12 16:49:32 +02:00
Nikita Popov
eabb8a6324 Skip syntax errors in skipif conditions 2019-06-12 15:56:38 +02:00
Nikita Popov
eea206a06c Merge branch 'PHP-7.4' 2019-06-12 13:18:04 +02:00
Nikita Popov
16f79129c7 Fix unused variables in fpm_env.c 2019-06-12 13:17:25 +02:00
Nikita Popov
9fa009c86d Merge branch 'PHP-7.4' 2019-06-12 09:29:06 +02:00
Nikita Popov
852ab5d83f Use %define api.pure instead of %pure-parser
%pure-parser is deprecated. In our case there is no difference between
true & full, as we don't use locations.
2019-06-12 09:26:34 +02:00
Nikita Popov
e4fae9c061 Merge branch 'PHP-7.4' 2019-06-11 13:16:38 +02:00
Nikita Popov
89b2d88659 Register class before fetching parent
We want the class declaration to be available while compiling the
parent class.
2019-06-11 13:09:33 +02:00
Joe Watkins
8f93beb06e
use XFAILIF rather than XFAIL to avoid warnings [ci skip] 2019-06-11 12:55:38 +02:00
Joe Watkins
9ecc0a4f29
use XFAILIF rather than XFAIL to avoid warnings [ci skip] 2019-06-11 12:55:28 +02:00
Joe Watkins
7361701351
Merge branch 'PHP-7.4'
* PHP-7.4:
  watchpoints have flaws in implementation
2019-06-10 14:23:55 +02:00
Joe Watkins
1e5004060e
watchpoints have flaws in implementation 2019-06-10 14:23:37 +02:00
Peter Kokot
76323fefac Merge branch 'PHP-7.4'
* PHP-7.4:
  Extend wildcard files section in EditorConfig [ci skip]
  Simplify LiteSpeed SAPI module version
  Use PHP_VERSION for zend modules
2019-06-09 22:55:43 +02:00
Peter Kokot
2dd6ec07d1 Simplify LiteSpeed SAPI module version
This patch syncs versioning of the LiteSpeed SAPI module by making it in
sync with the rest of the bundled PHP extensions and SAPIs.

Closes #4145
2019-06-09 22:32:47 +02:00
Peter Kokot
5b36c9fef6 Use PHP_VERSION for zend modules
Closes #4147
2019-06-09 22:32:47 +02:00
Nikita Popov
d154301866 Merge branch 'PHP-7.2' into PHP-7.3 2019-06-04 16:27:57 +02:00
Nikita Popov
a3e6b50442 Fixed bug #78050
This is a backport of a982125561.
2019-06-04 16:26:34 +02:00
Nikita Popov
623eedbbd5 Merge branch 'PHP-7.4' 2019-06-04 16:14:46 +02:00
Nikita Popov
18060e5923 Merge branch 'PHP-7.3' into PHP-7.4 2019-06-04 16:14:26 +02:00
Nikita Popov
a4633b13d4 Merge branch 'PHP-7.2' into PHP-7.3 2019-06-04 16:14:14 +02:00
Nikita Popov
2d3bc71e89 Reload tsrmls_id in release builds as well
If TSRM is shut down and started again (something that phpdbg does),
then tsrmls_id needs to be reloaded everywhere. As tsrmls_id
update is a rare operation, doing that shouldn't be a problem.
2019-06-04 16:12:59 +02:00
Nikita Popov
f721f2fa12 Merge branch 'PHP-7.4' 2019-06-04 15:09:01 +02:00
Nikita Popov
a982125561 Try to fix phpdbg + opcache compatibility 2019-06-04 15:08:55 +02:00
Anatol Belski
09ac6eb36d Merge branch 'PHP-7.4'
* PHP-7.4:
  Don't involve output check in the test
2019-06-01 23:33:00 +02:00
Anatol Belski
7a64150921 Don't involve output check in the test 2019-06-01 23:31:05 +02:00
Christoph M. Becker
e720fb7565 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix ZTS issue regarding new Windows CTRL handling API
2019-06-01 09:36:25 +02:00
Christoph M. Becker
637d8677b3 Fix ZTS issue regarding new Windows CTRL handling API
php_win32_signal_system_ctrl_handler() is called from a kernel thread,
so the former initialization of `vm_interrupt_flag` has no effect,
since it is defined as thread-local.  This is, however, not necessary,
since the CTRL signal handling is supposed to work only for the main
thread anyway.  We therefore change `vm_interrupt_flag` and the related
variables to true globals.

This also allows us to unmark the respective test case as XFAIL.

Furthermore, `vm_interrupt_flag` is declared as `zend_bool *`, so we
better treat it such.
2019-06-01 09:35:47 +02:00
Nikita Popov
8230d27c98 Merge branch 'PHP-7.4' 2019-05-31 10:54:58 +02:00
Nikita Popov
96a11bee1c Add CONFLCITS file for fpm
We should not run FPM tests in parallel due to port clashes.
2019-05-31 10:54:41 +02:00
Nikita Popov
4fff40e0d2 Merge branch 'PHP-7.4' 2019-05-31 09:18:09 +02:00
Nikita Popov
4b1f711823 Mark sapi_windows_set_ctrl_handler.phpt as XFAIL 2019-05-31 09:17:51 +02:00
Nikita Popov
4241258d74 Fix FPM tests for PHP 8 2019-05-29 17:31:10 +02:00
Nikita Popov
693955c5c5 Merge branch 'PHP-7.4' 2019-05-29 17:07:52 +02:00
Nikita Popov
3ba64545ed Update phpdbg oplog test 2019-05-29 17:05:01 +02:00
Nikita Popov
b32b8e91bd Update cli reflection test 2019-05-29 17:02:36 +02:00
Nikita Popov
43be89ed87 Remove two zpp tests in sapi/cli/tests
These fail on master -- apparently we're not running these tests...
2019-05-29 17:00:12 +02:00
Joe Watkins
3518c4dfe9
Merge branch 'PHP-7.4'
* PHP-7.4:
  Revert "Rename *.l files to *.re"
2019-05-20 06:07:03 +02:00
Joe Watkins
e11233dc49
Revert "Rename *.l files to *.re"
This reverts commit 969047749d.
2019-05-20 06:06:38 +02:00
Peter Kokot
0a7d71b593 Merge branch 'PHP-7.4'
* PHP-7.4:
  Rename *.l files to *.re
2019-05-17 23:54:12 +02:00
Peter Kokot
969047749d Rename *.l files to *.re
This syncs PHP lexer files to all use *.re extension. The *.re files are
processed with the RE2C tool.
2019-05-17 23:53:03 +02:00
Peter Kokot
6ca8e06f82 Merge branch 'PHP-7.4'
* PHP-7.4:
  Update UPGRADING about LiteSpeed
  Rename configure --with-litespeed to --enable-litespeed
2019-05-17 03:18:13 +02:00
Peter Kokot
8e456d3b9e Rename configure --with-litespeed to --enable-litespeed
This syncs the configuration option of the litespeed module to be
compliant with the approach of:
--with-foo (when something additional needs to be installed such as
  libfoo)
--enable-foo (when extension/sapi doesn't have dependencies on some
  library)
2019-05-17 03:14:13 +02:00
Jakub Zelenka
e75aa7ed21 Merge branch 'PHP-7.4' 2019-05-13 18:52:17 +01:00
Jakub Zelenka
5036c293b3 Merge branch 'PHP-7.3' into PHP-7.4 2019-05-13 18:51:41 +01:00
Jakub Zelenka
aa74c30466 Merge branch 'PHP-7.2' into PHP-7.3 2019-05-13 18:51:05 +01:00
Jakub Zelenka
ad63bd169b Add ping to the fpm test for bug #77934 2019-05-13 18:50:24 +01:00
Peter Kokot
406437eadb Merge branch 'PHP-7.4'
* PHP-7.4:
  [ci skip] Remove outdated fastcgi info in favor of the manual
2019-05-13 02:58:52 +02:00
Peter Kokot
ecb6a8db63 [ci skip] Remove outdated fastcgi info in favor of the manual 2019-05-13 02:57:20 +02:00
Peter Kokot
2cf90bb2f0 Merge branch 'PHP-7.4'
* PHP-7.4:
  Normalize comments in *nix build system m4 files
2019-05-12 18:51:50 +02:00
Peter Kokot
75fb74860d Normalize comments in *nix build system m4 files
Normalization include:
- Use dnl for everything that can be ommitted when configure is built in
  favor of the shell comment character # which is visible in the output.
- Line length normalized to 80 columns
- Dots for most of the one line sentences
- Macro definitions include similar pattern header comments now
2019-05-12 18:43:03 +02:00
Peter Kokot
628806c382 Merge branch 'PHP-7.4'
* PHP-7.4:
  Use PKG_CHECK_MODULES to detect the systemd library
2019-05-12 00:19:20 +02:00
Hugh McMaster
755f6f6ede Use PKG_CHECK_MODULES to detect the systemd library 2019-05-12 00:19:03 +02:00
Jakub Zelenka
4b2239b52b Merge branch 'PHP-7.4' 2019-05-11 20:10:43 +01:00
Jakub Zelenka
4bf37e467b Merge branch 'PHP-7.3' into PHP-7.4 2019-05-11 20:10:13 +01:00
Jakub Zelenka
0cad701374 Merge branch 'PHP-7.2' into PHP-7.3 2019-05-11 20:08:57 +01:00
Jakub Zelenka
cc5c51e7f0 Fix bug #77934 (php-fpm kill -USR2 not working) 2019-05-11 20:07:39 +01:00
Peter Kokot
a3c88135d4 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove unused variables
2019-05-10 22:58:29 +02:00
Peter Kokot
313930a36a Remove unused variables 2019-05-10 22:58:14 +02:00
George Wang
487ffb45d2 Merge branch 'PHP-7.4' 2019-05-09 18:16:09 -04:00
George Wang
dc63b0e480 Merge branch 'PHP-7.3' into PHP-7.4 2019-05-09 18:15:48 -04:00
George Wang
d2037b1bd4 Merge branch 'PHP-7.2' into PHP-7.3 2019-05-09 18:14:11 -04:00
George Wang
af4143753f Updated LiteSpeed SAPI to 7.3.2 to allow request header value length up to 64K. 2019-05-09 18:13:25 -04:00
Kalle Sommer Nielsen
c265652879 Merge branch 'PHP-7.4'
* PHP-7.4:
  Include the request method in CLI server logs
2019-05-02 23:32:43 +03:00