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

138902 Commits

Author SHA1 Message Date
Calvin Buckley
d3bf67d441 [ci skip] Port NEWS entries from 8.3.15 into 8.4.2
There was some confusion with the release branching, so these entries
didn't get included. All these changes should be in 8.4.2.
2024-12-16 13:33:23 -04:00
Sergey Panteleev
a9a1ac2f8d Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  PHP-8.2 is now for PHP 8.2.28-dev
2024-12-03 16:48:57 +03:00
Sergey Panteleev
432078ec4d Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  PHP-8.2 is now for PHP 8.2.28-dev

# Conflicts:
#	Zend/zend.h
#	configure.ac
#	main/php_version.h
2024-12-03 16:48:39 +03:00
Sergey Panteleev
7fbeee0c2f PHP-8.2 is now for PHP 8.2.28-dev 2024-12-03 16:48:02 +03:00
Dmitry Stogov
f04a9f466f Update IR
IR commit: 1a41bddcf0a41b9a3866d00b57591b3684c88443
2024-12-03 13:01:31 +03:00
Máté Kocsis
50264b03a0 Fix GH-16990 "dba_list() is now zero-indexed instead of using resource ids"
closes GH-17005
2024-12-03 00:48:34 +01:00
Niels Dossche
6753c55bdb Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix some MariaDB test failures
2024-12-02 19:21:37 +01:00
Niels Dossche
51e0920e45 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix some MariaDB test failures
2024-12-02 19:21:03 +01:00
Niels Dossche
1a6f8a0b79 Fix some MariaDB test failures
Allow other wording too such that these mysqli tests pass.

Closes GH-17004.
2024-12-02 19:20:54 +01:00
divinity76
c2d3734e89 Fix GH-15964: printf() can strip sign of -INF
We need to cater to negative infinity explicitly.

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-15965.
2024-12-02 14:27:36 +01:00
Dmitry Stogov
03bb112fb2 Fix GH-16984: function JIT overflow bug (#17015) 2024-12-02 13:30:26 +03:00
Niels Dossche
d7a37cc9ad Add missing backslash for TokenList interfaces in stub (#17009)
Discovered while trying to generate class synopses.
2024-12-01 15:18:44 +01:00
David Carlier
6419ae4c48 Merge branch 'PHP-8.3' into PHP-8.4 2024-12-01 13:58:38 +00:00
David Carlier
60eca67439 Merge branch 'PHP-8.2' into PHP-8.3 2024-12-01 13:58:21 +00:00
David Carlier
73ebc92617 Fix GH-16959: snmpget modifies the object_id (as array).
Instead of modifying the zval, we use the zend_try_get_string.

close GH-16969
2024-12-01 13:57:31 +00:00
Niels Dossche
c06a1a44f7 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-16998: UBSAN warning in rfc1867
2024-12-01 11:00:17 +01:00
Niels Dossche
4eaa6f9d4e Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-16998: UBSAN warning in rfc1867
2024-12-01 10:59:59 +01:00
Niels Dossche
aab784263d Fix GH-16998: UBSAN warning in rfc1867
The "else branch" of `next_line` can reset the `buf_begin` field to
NULL, causing the next invocation to pass NULL to `memchr` with a 0
length. When UBSAN is enabled this causes an UBSAN abort. Real world
impact is likely none because of the 0 length.

To fix this, don't set the pointer to NULL, which means that the
`memchr` will return NULL and since
`self->bytes_in_buffer < self->bufsize` we return NULL and request more
data through `fill_buffer`. That function will reset `buf_begin` and
`bytes_in_buffer` so that the next invocation works fine.

I chose this solution so we have an invariant that `buf_begin` is never
NULL, which makes reasoning easier. An alternative solution is keeping
the NULLing of `buf_begin` and add an extra check at the top of
`next_line`, but I didn't like special casing this.

Closes GH-17000.
2024-12-01 10:59:30 +01:00
Christoph M. Becker
ba7dee5676 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix potential OOB read in zend_dirname() on Windows
2024-11-29 22:11:00 +01:00
Christoph M. Becker
65070bb46c Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix potential OOB read in zend_dirname() on Windows
2024-11-29 22:09:40 +01:00
Christoph M. Becker
94fa2a4ce1 Fix potential OOB read in zend_dirname() on Windows
Only on Windows `IS_SLASH_P()` may read the previous byte, and so may
in unlikely cases read one byte out of bounds.  Since `IS_SLASH_P()` is
in a public header (albeit not likely to be used by external extensions
or SAPIs), we introduce `IS_SLASH_P_EX()` which accepts a second
argument to prevent that OOB read.

It should be noted that the PHP userland function `dirname()` is not
affected by this issue, since it does not call `zend_dirname()` on
Windows.

Closes GH-16995.
2024-11-29 22:08:06 +01:00
Niels Dossche
ab7c3b1e7b Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-16957: Assertion failure in array_shift with self-referencing array
2024-11-29 19:21:49 +01:00
Niels Dossche
f1fc4e8ff7 Fix GH-16957: Assertion failure in array_shift with self-referencing array
We have an RC1 violation because we're immediately dereferencing and
copying the resulting array in the test case. Instead, transfer the
lifetime using RETVAL_COPY_VALUE and unwrap only after the internal
iterator is reset.

Closes GH-16970.
2024-11-29 19:21:11 +01:00
Christoph M. Becker
8ea042d954 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-16991: Getting typeinfo of non DISPATCH variant segfaults
2024-11-29 16:32:12 +01:00
Christoph M. Becker
a4874bb418 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-16991: Getting typeinfo of non DISPATCH variant segfaults
2024-11-29 16:30:01 +01:00
Christoph M. Becker
9bae8933a3 Fix GH-16991: Getting typeinfo of non DISPATCH variant segfaults
We must not assume that any `VARIANT` implements `IDispatch`.

Closes GH-16992.
2024-11-29 16:29:11 +01:00
Dmitry Stogov
5ed438fe07 Update IR
IR commit: 673308a039eed5a2fdf4a2783b3dd3d6010a8c19
2024-11-29 16:28:27 +03:00
Saki Takamachi
d17ed3445d Fixed GH-16978: Avoid unnecessary padding with leading zeros (#16988)
Fixed an issue where leading zeros were padded beyond the allocated memory.

fixes #16978
closes #16988
2024-11-29 21:28:38 +09:00
Jakub Zelenka
8d25978d65 Merge branch 'PHP-8.3' into PHP-8.4 2024-11-29 08:06:10 +01:00
Jakub Zelenka
6f05d96a2b Merge branch 'PHP-8.2' into PHP-8.3 2024-11-29 07:56:28 +01:00
Jakub Zelenka
69765d9220 Fix network connect poll interuption handling
When connecting to socket, it is possible to get EINTR. In such case,
there should be an another attempt to connect if we are not over the
timeout. The timeout should be adjusted accordingly in that case.

This fixes https://github.com/phpredis/phpredis/issues/1881

Closes GH-16606
2024-11-29 07:54:06 +01:00
Dmitry Stogov
6fca900cc7 Update IR
IR commit: 7c26e26126123beac8dbaf811d5eac8d789d584f
2024-11-29 02:39:33 +03:00
Niels Dossche
3a80936391 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-16905: Internal iterator functions can't handle UNDEF properties
2024-11-28 19:22:55 +01:00
Niels Dossche
6a195bd9e7 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-16905: Internal iterator functions can't handle UNDEF properties
2024-11-28 19:22:36 +01:00
Niels Dossche
e1b4534790 Fix GH-16905: Internal iterator functions can't handle UNDEF properties
Closes GH-16907.
2024-11-28 19:22:10 +01:00
Pierrick Charron
fb919e885a PHP-8.4 is now for PHP 8.4.2-dev 2024-11-28 11:31:26 -05:00
Jakub Zelenka
e6997535f7 Update NEWS for GH-16932 fix 2024-11-28 09:02:21 +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
Máté Kocsis
3c70f5e976 Fix some odbc_*() parameter types 2024-11-27 23:05:50 +01:00
David Carlier
bceb3adb42 Merge branch 'PHP-8.3' into PHP-8.4 2024-11-27 19:54:23 +00:00
David Carlier
841e54daee Merge branch 'PHP-8.2' into PHP-8.3 2024-11-27 19:54:06 +00:00
David Carlier
5fd53a8b93 [skip ci] NEWS 2024-11-27 19:53:09 +00:00
David Carlier
7e8d6f941c Revert "ext/gmp: gmp_pow fix FPE with large values."
This reverts commit d70b7811b0.
2024-11-27 19:52:07 +00:00
David Carlier
45140e527f Revert "ext/gmp: gmp_pow fix FPE with large values."
This reverts commit e0a0e216a9.
2024-11-27 19:52:04 +00:00
Máté Kocsis
56fb910d9c Fix the 1st parameter type casing of pg_set_chunked_rows_size() 2024-11-26 22:48:33 +01:00
Dmitry Stogov
b89d7ff92a Fix GH-16821: runtime error: member access within misaligned address when running phpseclib tests (#16951) 2024-11-27 00:43:45 +03: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
Niels Dossche
0d8c5ade72 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Backport GH-14962 to stable versions
2024-11-26 21:25:13 +01:00