1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Commit Graph

6519 Commits

Author SHA1 Message Date
Ilija Tovilo
e8e6f900cd Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Mark sapi/fpm/tests/proc-idle-timeout.phpt as XFAIL
2026-03-07 12:42:39 +01:00
Ilija Tovilo
37bee6ef4c Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Mark sapi/fpm/tests/proc-idle-timeout.phpt as XFAIL
2026-03-07 12:42:21 +01:00
Ilija Tovilo
3902f843f7 [skip ci] Mark sapi/fpm/tests/proc-idle-timeout.phpt as XFAIL
This test fails all the time. It should be improved.
2026-03-07 12:41:52 +01:00
Nora Dossche
583be5a8ca Fix compile warnings under GCC 15.2.1 (#21320)
The compiler now infers constness through string functions.
Adhere to that.
It also now warns about using multiplications in conditions.
2026-03-02 23:12:06 +01:00
Ilija Tovilo
6f91209260 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Add RUN_RESOURCE_HEAVY_TESTS env var
2026-02-27 15:05:14 +01:00
Ilija Tovilo
c6ad84fb9e Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Add RUN_RESOURCE_HEAVY_TESTS env var
2026-02-27 15:04:24 +01:00
Ilija Tovilo
3a57b4ced5 Add RUN_RESOURCE_HEAVY_TESTS env var
Disable resource-heavy tests by default (>1GB of memory usage), unless the
RUN_RESOURCE_HEAVY_TESTS env variable is set.

Fixes GH-20762
Closes GH-20935
2026-02-27 15:00:35 +01:00
Michael Orlitzky
db6cca26dd sapi/*/Makefile.frag: install programs built with libtool, with libtool
When installing executables that were built using libtool, we are
supposed to use

  $ libtool --mode-install <install-command>

rather than the bare <install-command>. This is discussed ever so
briefly in the "Installing executables" section of the GNU libtool
documentation:

  https://www.gnu.org/software/libtool/manual/libtool.html

So far this has not caused a problem with GNU libtool on the platforms
that PHP supports, but there is an alternate libtool implementation
called slibtool that stores wrappers at the locations where PHP is
expecting the true executables to live. As a result, the wrappers (and
not the executables) are installed when slibtool is used to build PHP.

This is fixed by replacing,

  $(INSTALL)

with

  $(LIBTOOL) --mode=install $(INSTALL)

in the install-foo rules for the executables that are built with
libtool.

Closes GH-13674
2026-02-23 17:19:23 +01:00
Niels Dossche
4d28e2af9e Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  sapi/fpm: remove use of variable-length arrays (#10645)
2025-12-14 23:30:54 +01:00
Max Kellermann
5850c7de7c sapi/fpm: remove use of variable-length arrays (#10645)
According to @cmb69, PHP does not require VLA support
(https://github.com/php/php-src/pull/10304#discussion_r1069343092).
VLAs are a bad idea for several reasons, so let's get rid of them.

Two of the VLAs were probably unintended; unlike C++, C doesn't have
the concept of "constant expressions", so an array with a "const"
length is technically still a VLA.  This is fixed by removing the
"const" variable, and using sizeof() instead.

(cherry picked from commit ff2a211d55)
2025-12-14 23:30:37 +01:00
David Carlier
30fbcf9d7e Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-20554: php_cli_server() get http status as string build issue.
2025-11-22 22:25:51 +00:00
David Carlier
9149c35514 Fix GH-20554: php_cli_server() get http status as string build issue.
due to the signature of this helper it needs to be const also
bsearch key argument needs to be too.

close GH-20556
2025-11-22 22:25:33 +00:00
Gina Peter Banyard
a7fd6fc8d6 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  sapi/phpdbg: use 'h' ZPP specifier instead of'H'
2025-11-13 01:31:42 +00:00
Gina Peter Banyard
37e61a0dc0 sapi/phpdbg: fixed ZPP type violation by using 'h' ZPP specifier instead of 'H'
This aligns the behaviour with what the stubs say.
And even if one fixes the stubs the behaviour is not identical due to missing indirect handling.

This indicates that using objects is never done, so do the easy fix of changing the ZPP specifier.

Closes GH-20465
2025-11-13 01:30:49 +00:00
Gina Peter Banyard
414e7db68a sapi/phpdbg: use 'h' ZPP specifier instead of'H'
The stubs say array so in debug mode we get a ZPP violation assertion and even by fixing the stubs the behaviour is not identical due to missing indirect handling.

This indicates using objects was never done, thus use the correct ZPP specifier
2025-11-12 16:01:43 +00:00
Ilija Tovilo
51edaac9cf Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Skip fpm tests crashing lsan on GHA
2025-11-05 13:23:09 +01:00
Ilija Tovilo
b9eaee18e4 [skip ci] Skip fpm tests crashing lsan on GHA
> LeakSanitizer has encountered a fatal error.

This happens only on 8.2/8.3 for some reason. Don't merge for 8.4 for now, we
can do that later if it reoccurs.
2025-11-05 13:22:44 +01:00
Ilija Tovilo
5a427cee98 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Fix typo
2025-10-17 13:22:44 +02:00
Ilija Tovilo
5fd73b55a7 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Fix typo
2025-10-17 13:22:37 +02:00
Ilija Tovilo
413c73153d Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Fix typo
2025-10-17 13:22:32 +02:00
Ilija Tovilo
d62f70c6de [skip ci] Fix typo
Should've been skip, not flaky...
2025-10-17 13:21:49 +02:00
Ilija Tovilo
2fe20a075f Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Skip suspicious fpm tests on GH actions & macOS
2025-10-17 13:17:41 +02:00
Ilija Tovilo
75099da105 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Skip suspicious fpm tests on GH actions & macOS
2025-10-17 13:17:33 +02:00
Ilija Tovilo
2b0763148d Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Skip suspicious fpm tests on GH actions & macOS
2025-10-17 13:17:25 +02:00
Ilija Tovilo
b094d5a588 [skip ci] Skip suspicious fpm tests on GH actions & macOS
There have been misterious macOS failures with the following error for a long
time, which would usually happen 1-2x per nightly run:

> The hosted runner lost communication with the server. Anything in your
> workflow that terminates the runner process, starves it for CPU/Memory, or
> blocks its network access can cause this error.

After way too much debugging, it looks like this is caused by the two fpm tests
skipped in this commit. When there's a failure, the responsible test will run
for at least 120 seconds until the job is eventually killed by GitHub Actions.
It's not clear yet why the tests stall.

Debugging this is a PITA because the GitHub Actions log gets partially lost for
killed jobs. It took an external log server to actually figure out where the job
fails. Let's disable the tests first to be sure this actually solves the issue.
2025-10-17 13:04:11 +02:00
Jakub Zelenka
da7558ab4e Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-19974: fpm_status_export_to_zval segfault for parallel execution
2025-10-09 21:34:14 +02:00
Jakub Zelenka
059f9f78e5 Fix GH-19974: fpm_status_export_to_zval segfault for parallel execution
The fix fixes some other races that could result in mixed up copy and
nprocs number. It requires creating a copy in a similar way like for
request status.

This was not previously used to not impact other requests. However this
does not make that much sense as the only thing that impacts it is
holding the lock and not waiting for it. It is true that if there was a
big contention then the lock would be acquired more often but that can
be achieved by using fpm_get_status in loop so it should not make a
huge difference hopefully.

Closes GH-19974
2025-10-09 21:32:04 +02:00
Ilija Tovilo
b07bc62e0c Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  ensure test passes with prod config
  Fix CGI with auto_globals_jit=0
2025-10-07 18:45:38 +02:00
Remi Collet
2f4b8e691a ensure test passes with prod config 2025-10-07 18:44:41 +02:00
Ilija Tovilo
9bc35f1982 Fix CGI with auto_globals_jit=0
In CGI, php_auto_globals_create_server() (i.e. auto_global_callback() here)
initializes $_ENV to reuse for $_SERVER. However, because $_SERVER is
constructed first, we have not yet initialized auto_global->armed of the $_ENV
global. Split the loop into initialization and constructor phases.

Fixes GH-19934
Closes GH-19870
2025-10-07 18:43:32 +02:00
Ilija Tovilo
0099779902 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Treat accept failing with SOCK_EAGAIN as success in CLI web server
2025-10-06 14:20:12 +02:00
Leo Gaskin
7e7d6d6380 Treat accept failing with SOCK_EAGAIN as success in CLI web server
This ensures that no useless "Failed to poll event" error messages are
logged during normal server operation, as the SOCK_EAGAIN error simply
indicates another worker is already serving the request.

Closes GH-19964
2025-10-06 14:19:45 +02:00
Ilija Tovilo
7bce6d89e7 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Skip php_cli_server_pdeathsig.phpt if pgrep is missing
2025-09-23 17:15:09 +02:00
Ilija Tovilo
c6a6cb79f9 [skip ci] Skip php_cli_server_pdeathsig.phpt if pgrep is missing
Fixes GH-19911
Closes GH-19923
2025-09-23 17:14:51 +02:00
Jakub Zelenka
e946e9b329 Merge branch 'PHP-8.3' into PHP-8.4 2025-09-09 22:03:49 +02:00
Jakub Zelenka
3a17712269 Merge branch 'PHP-8.2' into PHP-8.3 2025-09-09 21:59:35 +02:00
Jakub Zelenka
6f92e9c054 Merge branch 'PHP-8.1' into PHP-8.2 2025-09-09 21:58:37 +02:00
Jakub Zelenka
c0f8bb6622 Revert "fix pipe detection for STDERR."
This reverts commit a757f276f9.
2025-09-09 21:57:54 +02:00
Remi Collet
7f9de57fb4 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Mark test as ONLINE (#19776)
2025-09-09 16:34:52 +02:00
Remi Collet
d2fa1ca600 Mark test as ONLINE (#19776) 2025-09-09 16:34:02 +02:00
George Wang
1557bb81a9 Merge branch 'PHP-8.3' into PHP-8.4 2025-09-06 12:47:20 -04:00
George Wang
ebbed484fb update LiteSpeed API to V8.3 2025-09-06 12:46:56 -04:00
George Wang
aa3983b31b fix pipe detection for STDERR. 2025-09-06 12:44:54 -04:00
George Wang
828080146b fix pipe detection for STDERR. 2025-09-06 12:39:53 -04:00
George Wang
a757f276f9 fix pipe detection for STDERR. 2025-09-06 12:38:13 -04:00
Alexandre Daubois
d84f463e3c Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-19461: Improve error message on listening error with IPv6 (#19462)
2025-09-05 10:50:11 +02:00
Alexandre Daubois
a41cb62c4c Fix GH-19461: Improve error message on listening error with IPv6 (#19462) 2025-09-05 10:48:33 +02:00
Ilija Tovilo
6f17c693ef Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix RC assertion in fpm when php_admin_value setting fails
2025-09-03 14:50:15 +02:00
Ilija Tovilo
15beb140e5 Fix RC assertion in fpm when php_admin_value setting fails
The value is temporarily duplicated. While the value is allocated persistently,
it will be freed if the ini value can't be set. This is safe, given the value
has not actually been stored.

Exposed by GH-19619
Closes GH-19671
2025-09-03 14:49:06 +02:00
Niels Dossche
b57578f3b1 Fix GH-19383: php-8.3.24: Missing type in function definition: fpm_event_kqueue_clean
This is just a clean backport.
2025-08-10 13:25:24 +02:00