1
0
mirror of https://github.com/php/php-src.git synced 2026-03-30 12:13:02 +02:00
Commit Graph

5753 Commits

Author SHA1 Message Date
Christoph M. Becker
cf971a1401 Fix potential parallel test conflict
Cf. <https://ci.appveyor.com/project/php/php-src/builds/43644961/job/xibhmsbs8panajy2?fullLog=true#L15770>.
2022-05-24 16:49:19 +02:00
George Peter Banyard
5ba6ecd523 Minor refactoring of main/main.c and TSRM (#8608) 2022-05-24 08:34:55 +01:00
George Peter Banyard
2ecd46f48f Initialise zend_stat_t to fix MSAN build 2022-05-22 16:06:27 +01:00
Nikita Popov
82d407b7e0 Revert "Refactor CLI SAPI php_cli_server_client struct to use zend_string (#8522)"
This reverts commit 9b19d90432.

This has broken the ZEND_RC_DEBUG build.
2022-05-21 16:52:21 +02:00
Levi Morrison
c53c3e200b Stop closing stderr and stdout streams (#8571)
Extensions may (and do) write to stderr in mshutdown and similar. In
the best case, with the stderr stream closed, it's just swallowed.

However, some libraries will do things like try to detect color, and
these will outright fail and cause an error path to be taken.
2022-05-20 13:41:02 +02:00
Arnaud Le Blanc
980385d12d Merge branch 'PHP-8.1'
* PHP-8.1:
  Stop closing stderr and stdout streams (#8570)
  Revert "XFAIL tests (GH-8588)"
  XFAIL tests (GH-8588)
  Stop closing stderr and stdout streams (#8569)
2022-05-20 13:40:27 +02:00
Levi Morrison
ffd27bdec4 Stop closing stderr and stdout streams (#8570)
Extensions may (and do) write to stderr in mshutdown and similar. In
the best case, with the stderr stream closed, it's just swallowed.

However, some libraries will do things like try to detect color, and
these will outright fail and cause an error path to be taken.
2022-05-20 13:40:09 +02:00
Arnaud Le Blanc
6465f3ed13 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  XFAIL tests (GH-8588)
  Stop closing stderr and stdout streams (#8569)
2022-05-20 13:36:22 +02:00
Levi Morrison
fa78e17724 Stop closing stderr and stdout streams (#8569)
Extensions may (and do) write to stderr in mshutdown and similar. In
the best case, with the stderr stream closed, it's just swallowed.

However, some libraries will do things like try to detect color, and
these will outright fail and cause an error path to be taken.
2022-05-20 13:27:23 +02:00
Levi Morrison
282655083e Fix some minor warnings (#8568)
* Fix php_apache_get_version prototype

Avoids an error with -Werror=strict-prototypes when building the
Apache SAPI.

* Fix -Werror=stringop-truncation in pdo_raise_impl_error

* Note pdo_error_type BC break
2022-05-18 08:30:59 -06:00
George Peter Banyard
9b19d90432 Refactor CLI SAPI php_cli_server_client struct to use zend_string (#8522)
This is a stepping stone in converting more pairs of ``char*`` and ``size_t`` to ``zend_string*`` across the CLI SAPI.

Also amend the CLI SAPI test setup to output it's content when it crashes/errors so that one can debug ASAN/UBSAN/MSAN violations.

Drive-by MSAN fix.

Co-authored-by: Arnaud Le Blanc <arnaud.lb@gmail.com>
2022-05-15 21:11:13 +01:00
Christoph M. Becker
81d1a1b47b Update bug tracker links
The new php-src bugtracker is on Github.

Closes GH-8277.
2022-05-12 14:55:11 +02:00
Jakub Zelenka
9149d165ee Merge branch 'PHP-8.1' 2022-05-10 21:40:44 +01:00
Jakub Zelenka
82eea0efc9 Merge branch 'PHP-8.0' into PHP-8.1 2022-05-10 21:39:31 +01:00
Jakub Zelenka
23a2030438 Fix bug #72185: php-fpm writes empty fcgi record causing nginx 502
This issue might happen if there is change of the fcgi stream when
the buffer is full. Then the empty record is created which signals
end of stream which is incorrect.

The actual fix without a test was contributed by GitHub user @loveharmful
in GH-3198.
2022-05-10 21:36:55 +01:00
George Peter Banyard
d4e24e72af Fix Windows build
sapi\cli\php_cli_server.c(2637): warning C4133: 'function': incompatible types - from 'zend_result (__cdecl *)(void *,php_socket_t,int)' to 'int (__cdecl *)(void *,php_socket_t,int)'

Probably a good idea to make GCC complain about these sort of issues too
2022-05-10 12:26:54 +01:00
George Peter Banyard
0fad4d1d96 Fix ASAN build 2022-05-10 12:04:42 +01:00
George Peter Banyard
9601475ebb Minimal refactoring of CLI SAPI (#8519)
More specific types, some cleanup and voidifying functions which always return ``SUCCESS``
2022-05-09 22:29:16 +01:00
Nikita Popov
9e87be4395 Add generate_mbstring_dict.php
Forgot to git add it previously.
2022-05-09 09:13:21 +02:00
Nikita Popov
1584352e19 Add fuzzer for mb_convert_encoding
This uses the php-fuzz-mbstring name, moving the existing fuzzer
to php-fuzz-mbregex.
2022-05-08 22:34:23 +02:00
Ilija Tovilo
9a90bd7054 Deprecate ${} string interpolation
https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation
2022-05-05 10:14:56 +02:00
Jakub Zelenka
6e0a378c8b Merge branch 'PHP-8.1' 2022-04-29 20:44:35 +01:00
Jakub Zelenka
0332b62c35 Merge branch 'PHP-8.0' into PHP-8.1 2022-04-29 20:41:13 +01:00
David CARLIER
ef06f0f50b Fix FPM ACL build check on MacOS
MacOS has got ACL support but without user/group support.
2022-04-29 20:39:22 +01:00
Christoph M. Becker
3c28be8255 Close GH-8306: don't use of bitwise '|' with boolean operands
The code used bitwise operators to avoid the short-circuiting behavior
of the logical operators.  We refactor for clarity, and to keep
compilers and static analyzers happy.

Closes GH-8442.
2022-04-28 14:42:36 +02:00
George Peter Banyard
b5db594fd2 Refacto php_module_startup() (#8303)
It only ever uses at most 1 additional modules
2022-04-27 23:07:11 +01:00
Jakub Zelenka
09d313daac Merge branch 'PHP-8.1' 2022-04-27 19:17:33 +01:00
Jakub Zelenka
21d551ad0f Merge branch 'PHP-8.0' into PHP-8.1 2022-04-27 19:14:47 +01:00
Jakub Zelenka
0df28869f6 Add skip for FPM resource heavy tests 2022-04-27 19:11:47 +01:00
Ilija Tovilo
619f40f14c Fix leak introduced by GH-8241 (#8403)
Temporarily store result of ini builder in ini_entries to avoid a leak
when main() exists prematurely. Technically ini_entries isn't released
either but ASAN doesn't consider unreleased memory referenced from
globals leaks.
2022-04-25 09:31:51 +02:00
Jakub Zelenka
53285891fb Merge branch 'PHP-8.1' 2022-04-23 15:19:04 +01:00
Jakub Zelenka
8da14a3062 Merge branch 'PHP-8.0' into PHP-8.1 2022-04-23 15:16:00 +01:00
David Carlier
ff90d42b8b Fix FPM kqueue handler fix remove callback typo
It avoids confusion on failed event.
2022-04-23 15:11:53 +01:00
Jakub Zelenka
4ec92c6253 Update NEWS and www.conf with listen.backlog default change 2022-04-23 13:25:08 +01:00
Cristian Rodríguez
1e562683cb fpm: listen backlog should default to -1 also on Linux
On linux -1 means system administrator choosen default or kernel
default, this varies between kernel versions or distributions
it used to be 128 now it is 4096.
2022-04-23 13:20:42 +01:00
Jakub Zelenka
436cffc971 Merge branch 'PHP-8.1' 2022-04-22 23:08:23 +01:00
Jakub Zelenka
abd56aeb9a Merge branch 'PHP-8.0' into PHP-8.1 2022-04-22 23:07:01 +01:00
Jakub Zelenka
d8612fb6b7 Fix bug #77023: FPM cannot shutdown processes
This change introduces subsequent kill of the process when idle process quit
(SIGQUIT) does not succeed. It can happen in some situations and means that FPM
is not able to scale down in dynamic pm. Using SIGKILL fixes the issue.
2022-04-22 20:51:02 +01:00
Max Kellermann
d87ba95acd sapi/*: move duplicate "--define" code to library 2022-04-18 16:52:08 +02:00
Jakub Zelenka
1f0261a3e3 Merge branch 'PHP-8.1' 2022-04-15 22:21:50 +01:00
Jakub Zelenka
a57625374d Merge branch 'PHP-8.0' into PHP-8.1 2022-04-15 22:21:18 +01:00
David Carlier
2f0918c638 Fix FPM socket clean up reallocation clang build warning 2022-04-15 22:20:15 +01:00
David Carlier
fc9fecbd09 Fix FPM zlog warning with var being uninitialized 2022-04-15 22:19:36 +01:00
David CARLIER
7be195caa7 Support fpm_get_socket_listening_queue on macOS
Using TCP_CONNECTION_INFO socket option.
2022-04-15 21:21:43 +01:00
Jakub Zelenka
b0b416b705 Merge branch 'PHP-8.1' 2022-04-12 23:16:26 +01:00
Jakub Zelenka
62b676ff0f Merge branch 'PHP-8.0' into PHP-8.1 2022-04-12 23:15:34 +01:00
Jakub Zelenka
33bb201b3e Fix bug #76003: FPM /status reports wrong number of active processe
The fix introduces early locking of scoreboard when it is updated
which prevents the race condition causing an incorrect number of
active processes being set.
2022-04-12 23:12:11 +01:00
David Carlier
7bb2a9ff38 Add extra check for FPM proc dumpable on SELinux based systems
The deny_ptrace is a OS runtime setting and is off by default,
at least on workstations flavors (fedora) however it might be
different on production servers.
2022-04-08 17:07:58 +01:00
David Carlier
2874e5fa05 FPM: Emit error for invalid port setting 2022-04-03 21:24:46 +01:00
Martin Kealey
2fc1ddc0f1 line break before --prefix in php-fpm man page 2022-03-27 17:44:31 +02:00