Commit graph

6440 commits

Author SHA1 Message Date
Niels Dossche
2860c3d641
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix crashes in function registration + test
2025-01-06 21:31:03 +01:00
Niels Dossche
1235c74828
Fix crashes in function registration + test
Internal function won't need their refcount increased as they outlive
the debugger session, and userland functions won't be unloaded either.
So no refcount management is necessary for registered functions.
2025-01-06 21:30:34 +01:00
Niels Dossche
2161959834
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-17208: bug64539-status-json-encoding.phpt fail on 32-bits
2024-12-27 21:48:52 +01:00
Niels Dossche
847d1401a0
Fix GH-17208: bug64539-status-json-encoding.phpt fail on 32-bits
The reason this breaks is because of a type mismatch.
The following line uses fields of the timeval struct which are both 8 bytes on
Alpine 32-bit, which results in a computed value of also 8 bytes:
b09ed9a0f2/sapi/fpm/fpm/fpm_status.c (L611)

However, it is passed to a format string which expects 4 bytes
(`unsigned long` and thus the `%lu` format specifier is 4 bytes on Alpine 32-bit),
resulting in argument corruption.
Since the value is generally small, truncating to 4 bytes is sufficient to fix this.

Closes GH-17286.
2024-12-27 21:48:15 +01:00
Niels Dossche
ce322fd1f3
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [ci skip] Make build command for program using embed portable
2024-12-24 14:38:13 +01:00
Kévin Dunglas
a24eada99b
[ci skip] Make build command for program using embed portable
Closes GH-17247.
2024-12-24 14:37:44 +01:00
Christoph M. Becker
0285e9a868
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Include relevant system headers before defining fallbacks
2024-12-22 16:30:04 +01:00
Christoph M. Becker
fcbfd5a680
Include relevant system headers before defining fallbacks
Otherwise we may define the fallbacks, and later inclusion of the
system headers may attempt to redefine those.

Fixes GH-17112.
Closes GH-17129.
2024-12-22 16:27:01 +01:00
Jakub Zelenka
c4c536da4c
Merge branch 'PHP-8.3' into PHP-8.4 2024-12-22 14:58:08 +01:00
Jakub Zelenka
e0b79cdc5c
Introduce FPM_TEST_DEBUG_FILTER env var and extend multi request tracing 2024-12-22 14:15:03 +01:00
Jakub Zelenka
0cc0c7c7d9
Merge branch 'PHP-8.3' into PHP-8.4 2024-12-14 15:01:17 +01:00
Jakub Zelenka
3490ac0cb3
Fix GH-13437: FPM: ERROR: scoreboard: failed to lock (already locked)
This changes locking for scoreboard to reduce contention between readers
and adds retries for acquiring scoreboard for read.

Closes GH-15805
2024-12-14 14:59:56 +01:00
Jakub Zelenka
d165670d04
Fix GH-16932: wrong FPM status output
Closes GH-16974

Co-authored-by: James Lucas <james@lucas.net.au>
2024-11-28 08:59:55 +01:00
Niels Dossche
5ff67f8720
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-15208: Segfault with breakpoint map and phpdbg_clear()
2024-11-26 22:27:35 +01:00
Niels Dossche
3c3ec0e61a
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15208: Segfault with breakpoint map and phpdbg_clear()
2024-11-26 22:27:06 +01:00
Niels Dossche
97b03186c4
Fix GH-15208: Segfault with breakpoint map and phpdbg_clear()
It crashes because it's gonna try accessing the breakpoint which was cleared
by user code in `phpdbg_clear();`. Not all breakpoint data was properly
cleaned.

Closes GH-16953.
2024-11-26 22:26:37 +01:00
Jakub Zelenka
7c96af42b7
Merge branch 'PHP-8.3' into PHP-8.4 2024-11-20 11:14:04 +01:00
Jakub Zelenka
ffff27f734
Merge branch 'PHP-8.2' into PHP-8.3 2024-11-20 11:12:19 +01:00
Niels Dossche
f18d429b20
Fix GHSA-4w77-75f9-2c8w 2024-11-20 11:07:28 +01:00
Jakub Zelenka
49bc011c9f
Merge branch 'PHP-8.3' into PHP-8.4 2024-11-08 16:50:41 +01:00
Jakub Zelenka
af8ebb12ca
Merge branch 'PHP-8.2' into PHP-8.3 2024-11-08 16:48:25 +01:00
Jakub Zelenka
065bde1e13
Fix GH-16432: PHP-FPM 8.2 SIGSEGV in fpm_get_status 2024-11-08 16:44:05 +01:00
Niels Dossche
2f5021b6bd
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix test with shared zend_test (#16705)
2024-11-05 21:36:48 +01:00
Niels Dossche
9a255b384f
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix test with shared zend_test (#16705)
2024-11-05 21:36:41 +01:00
Niels Dossche
3f1ea1b663
Fix test with shared zend_test (#16705) 2024-11-05 21:35:47 +01:00
Niels Dossche
bfd9e0cca3
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-16628: FPM logs are getting corrupted with this log statement
  Fix GH-16601: Memory leak in Reflection constructors
2024-11-02 19:38:54 +01:00
Niels Dossche
16cda10650
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-16628: FPM logs are getting corrupted with this log statement
  Fix GH-16601: Memory leak in Reflection constructors
2024-11-02 19:37:28 +01:00
Niels Dossche
e643129bbb
Fix GH-16628: FPM logs are getting corrupted with this log statement
zlog_buf_prefix() can return a larger length than what actually was
written due to its use of snprintf(). The code in
zlog_stream_prefix_ex() does not take this into account, other callers
do. What ends up happening then is that stream->length is set to the
length as if snprintf() was able to write all bytes, causing
stream->length to become larger than stream->buf.size, causing a
segfault.

In case the buffer was too small we try with a larger buffer up to a
limit of zlog_limit. This makes sure that the stream length will remain
bounded by the buffer size.

This also adds assertions to make the programmer intent clear and catch
this more easily in debug builds.

Closes GH-16680.
2024-11-02 19:36:20 +01:00
Ilija Tovilo
3074cbf5b6
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Skip shebang in cli-server router script
2024-10-14 13:35:41 +02:00
Ilija Tovilo
77f770871b
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Skip shebang in cli-server router script
2024-10-14 13:34:21 +02:00
Ilija Tovilo
06efe44c2e
Skip shebang in cli-server router script
Fixes GH-16373
Closes GH-16403
2024-10-14 13:33:16 +02:00
Christoph M. Becker
980d41cb3a
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-16174: Empty string is an invalid expression for phpdbg-ev
2024-10-10 01:47:23 +02:00
Christoph M. Becker
5c6fc09e45
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-16174: Empty string is an invalid expression for phpdbg-ev
2024-10-10 01:46:30 +02:00
Christoph M. Becker
6bcba24eb0
Fix GH-16174: Empty string is an invalid expression for phpdbg-ev
Strings may be empty, so we must not assume they are not.

Closes GH-16177.
2024-10-10 01:45:37 +02:00
Jakub Zelenka
ee7e21020e
Fix FPM tester params type 2024-10-06 21:26:42 +01:00
Jakub Zelenka
10d2d862a6
Merge branch 'PHP-8.3' into PHP-8.4 2024-10-06 19:43:19 +01:00
Jakub Zelenka
59816b9a73
Merge branch 'PHP-8.2' into PHP-8.3 2024-10-06 19:40:24 +01:00
Jakub Zelenka
5a47f27021
Fix GH-15395: php-fpm: zend_mm_heap corrupted with cgi-fcgi request
Closes GH-16227

Co-authored-by: David Carlier <devnexen@gmail.com>
2024-10-06 19:37:55 +01:00
David Carlier
139accecb4
Merge branch 'PHP-8.3' into PHP-8.4 2024-10-03 22:46:02 +01:00
David Carlier
4b7a906d57
Merge branch 'PHP-8.2' into PHP-8.3 2024-10-03 22:45:51 +01:00
David Carlier
3d80d98a10
Fix GH-16137: "Deduplicate" http headers values but Set-Cookie.
Those are meant to have 1 or plus values separated by a comma even
 if the client set them separately.

close GH-16154
2024-10-03 22:45:31 +01:00
Arnaud Le Blanc
443aa29dbe
Support stack limit in phpdbg SAPI
Fixes GH-16041
Closes GH-16055
2024-10-03 15:22:51 +02:00
Christoph M. Becker
3c1af3febb
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-16181: phpdbg: exit in exception handler reports fatal error
2024-10-03 11:39:03 +02:00
Christoph M. Becker
95c97c81b7
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-16181: phpdbg: exit in exception handler reports fatal error
2024-10-03 11:37:15 +02:00
Christoph M. Becker
f14e5cfaaa
Fix GH-16181: phpdbg: exit in exception handler reports fatal error
When running PHP code, we must not handle `UnwindExit` exceptions, but
rather have to ignore them.

Closes GH-16182.
2024-10-03 11:36:13 +02:00
Ilija Tovilo
bc07a8a28a
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix printing backtrace of fake generator frame
2024-09-27 17:37:07 +02:00
Ilija Tovilo
8c556b211d
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix printing backtrace of fake generator frame
2024-09-27 17:35:55 +02:00
Ilija Tovilo
706bcdbc1a
Fix printing backtrace of fake generator frame
Fixes GH-15851
Closes GH-15952
2024-09-27 17:34:51 +02:00
Ben Ramsey
d854a54b5f
Merge branch 'PHP-8.3' into PHP-8.4 2024-09-26 14:24:13 -05:00
Ben Ramsey
6d99ccc268
Merge branch 'PHP-8.2' into PHP-8.3 2024-09-26 14:13:00 -05:00