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

139024 Commits

Author SHA1 Message Date
Ilija Tovilo
0ce151b8fe Merge branch 'PHP-8.4'
* PHP-8.4:
  Add NEWS entry
  Also fix same issue in ArrayObject::exchangeArray()
  Fix use-after-free in ArrayObject::unset() with destructor
2024-11-04 17:50:37 +01:00
Ilija Tovilo
66ad4ce699 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Add NEWS entry
  Also fix same issue in ArrayObject::exchangeArray()
  Fix use-after-free in ArrayObject::unset() with destructor
2024-11-04 17:49:08 +01:00
Ilija Tovilo
dca438e6a3 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Add NEWS entry
  Also fix same issue in ArrayObject::exchangeArray()
  Fix use-after-free in ArrayObject::unset() with destructor
2024-11-04 17:47:49 +01:00
Ilija Tovilo
418f820f5d Add NEWS entry 2024-11-04 17:46:17 +01:00
Ilija Tovilo
f7222bd2de Also fix same issue in ArrayObject::exchangeArray() 2024-11-04 17:46:17 +01:00
Ilija Tovilo
8910ac800d Fix use-after-free in ArrayObject::unset() with destructor
Fixes GH-16646
Closes GH-16653
2024-11-04 17:45:56 +01:00
Ilija Tovilo
0ad6e4efb0 [skip ci] Document --repeat flag as internal (GH-16698)
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2024-11-04 17:40:08 +01:00
Ilija Tovilo
dbcdd4e4a7 Merge branch 'PHP-8.4'
* PHP-8.4:
  Postpone zend_array_sort() in ext-intl
  Use bool for zend_array_sort()
2024-11-04 16:02:47 +01:00
Ilija Tovilo
085c151481 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Postpone zend_array_sort() in ext-intl
  Use bool for zend_array_sort()
2024-11-04 16:02:31 +01:00
Ilija Tovilo
745684290e Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Postpone zend_array_sort() in ext-intl
  Use bool for zend_array_sort()
2024-11-04 16:02:16 +01:00
Ilija Tovilo
845cdbce67 Postpone zend_array_sort() in ext-intl
This function is not ZEND_API yet, so we cannot use it as it won't work for
dynamically linked extensions.
2024-11-04 16:01:00 +01:00
Ilija Tovilo
4b9e59b430 [skip ci] Use bool for zend_array_sort()
zend_bool is removed in higher branches.
2024-11-04 15:59:18 +01:00
Ilija Tovilo
ecb87ca5f1 Mark new zend_array_sort_ex() as ZEND_API 2024-11-04 15:53:51 +01:00
Ilija Tovilo
d82fa6adf6 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix array going away during sorting
2024-11-04 15:53:03 +01:00
Ilija Tovilo
230defc198 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix array going away during sorting
2024-11-04 15:51:24 +01:00
Ilija Tovilo
f033cf75e4 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix array going away during sorting
2024-11-04 15:51:03 +01:00
Ilija Tovilo
2bdce61390 Fix array going away during sorting
Fixes GH-16648
Closes GH-16654
2024-11-04 15:50:35 +01:00
Ilija Tovilo
fa15ac542e [skip ci] Merge branch 'PHP-8.4'
* PHP-8.4:
  [skip ci] Fix nightly workflow dispatch
2024-11-04 15:04:25 +01:00
Ilija Tovilo
ea39a89a74 [skip ci] Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Fix nightly workflow dispatch
2024-11-04 15:04:14 +01:00
Ilija Tovilo
5852c89034 [skip ci] Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Fix nightly workflow dispatch
2024-11-04 15:03:58 +01:00
Ilija Tovilo
2985de72db [skip ci] Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Fix nightly workflow dispatch
2024-11-04 15:03:47 +01:00
Ilija Tovilo
e72854e8bc [skip ci] Fix nightly workflow dispatch
Closes GH-16662
2024-11-04 15:02:11 +01:00
David Carlier
f37fd7fa1a Merge branch 'PHP-8.4' 2024-11-03 13:40:34 +00:00
David Carlier
f5b0a9ad19 Merge branch 'PHP-8.3' into PHP-8.4 2024-11-03 13:40:25 +00:00
David Carlier
b28ded42eb Merge branch 'PHP-8.2' into PHP-8.3 2024-11-03 13:39:41 +00:00
David Carlier
90aac521fd Fix GH-16592 msg_send() crashes when the type does not serialize as expected.
It is assumed that the serialization always had initialised its buffer
zend_string, but in the case of a type not serialising, it is null.

close GH-16599
2024-11-03 13:39:24 +00:00
Niels Dossche
64f2d11e38 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-16628: FPM logs are getting corrupted with this log statement
  Fix GH-16601: Memory leak in Reflection constructors
2024-11-02 19:39:00 +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
Niels Dossche
f0f666ba3f Fix GH-16601: Memory leak in Reflection constructors
Additionally fixes wrong behaviour in ReflectionParameter when you first
have a construction that uses an object and the subsequent doesn't.

Closes GH-16672.
2024-11-02 19:35:20 +01:00
Gina Peter Banyard
5d7fe139b5 Merge branch 'PHP-8.4'
* PHP-8.4:
  ext/gmp: Fix segfault when null is encountered on an overloaded operator
  ext/gmp: Add behavioural tests for operator overloading
2024-11-02 17:41:46 +00:00
Gina Peter Banyard
9e2367f29f Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  ext/gmp: Fix segfault when null is encountered on an overloaded operator
  ext/gmp: Add behavioural tests for operator overloading
2024-11-02 17:41:27 +00:00
Gina Peter Banyard
65d42342a1 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  ext/gmp: Fix segfault when null is encountered on an overloaded operator
  ext/gmp: Add behavioural tests for operator overloading
2024-11-02 17:40:41 +00:00
Gina Peter Banyard
5253647500 ext/gmp: Fix segfault when null is encountered on an overloaded operator
And various other issues like inconsistent type errors

Closes GH-16015
2024-11-02 17:36:32 +00:00
Gina Peter Banyard
fe02fd5095 ext/gmp: Add behavioural tests for operator overloading 2024-11-02 17:32:43 +00:00
Christoph M. Becker
9afc66fb51 Fix ICU version specific skip reasons of intl tests (GH-16661)
* Some tests have this backwards, probably reading "skip for ICU …".
  However, that is not how skip reasons are handled.
* Some test seems to have typos in the skip reason version.
* Some tests checked for a certain version, but reported the
  *presumably* next version, which is confusing at best.
* Some tests checked versions in descending order, what is not wrong,
  but confusing.
* Some tests had off by one errors.

For all tests, we assume that the skipif conditions are correct, and
fix the reasons.
2024-11-02 15:48:43 +01:00
David Carlier
ca5fd05536 ext/posix: adding POSIX_SC_OPEN_MAX constant.
returns the number of file descriptors that a process can handle.
e.g. useful after pcntl_fork() to close all the file descriptors up
to that boundary.

close GH-16681
2024-11-02 14:28:07 +00:00
Markus Staab
cf5ded9cc5 run-tests: removed unused code (#16675) 2024-11-02 11:39:40 +01:00
Markus Staab
cda67fb544 run-tests: drop hrtime() polyfill (#16677) 2024-11-02 10:27:47 +01:00
Markus Staab
836bd22257 run-tests.php: fix wrong comment
[ci skip]

Closes GH-16666.
2024-11-02 10:24:16 +01:00
Christoph M. Becker
2b10cd1beb Deprecate mhash constants
The mhash functions already have been deprecated as of PHP 8.1.0[1],
but the respective constants appear to have been missed.  We catch up
on that.

[1] <https://wiki.php.net/rfc/deprecations_php_8_1#mhash_function_family>

Closes GH-16569.
2024-11-02 01:07:03 +01:00
Christoph M. Becker
7c37c25ef2 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-14732: date_sun_info() fails for non-finite values
2024-11-01 23:51:06 +01:00
Christoph M. Becker
68d3000902 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-14732: date_sun_info() fails for non-finite values
2024-11-01 23:50:40 +01:00
Christoph M. Becker
8df513336a Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-14732: date_sun_info() fails for non-finite values
2024-11-01 23:47:21 +01:00
Christoph M. Becker
f9453a889d Fix GH-14732: date_sun_info() fails for non-finite values
`timelib_astro_rise_set_altitude()` is not prepared to deal with non-
finite values (`nan`, `inf` and `-inf`) for `lon` and `lat`; instead
these trigger undefined behavior.  Thus we catch non-finite values
before even calling that timelib function; for `date_sun_info()` we
trigger `ValueError`s; for `date_sunrise()` and `date_sunset()` we
silently return `false`, since these functions will be sunsetted
anyway.

Closes GH-16497.
2024-11-01 23:46:19 +01:00
Christoph M. Becker
dd5c8f7737 Merge branch 'PHP-8.4'
* PHP-8.4:
  Adapt ext/intl tests for ICU 76.1
2024-11-01 22:22:03 +01:00
Christoph M. Becker
3245a65034 Adapt ext/intl tests for ICU 76.1
Regarding the test names, see PR #9800.

Closes GH-16660.
2024-11-01 22:21:23 +01:00
Christoph M. Becker
c0136f0cb9 Avoid dl() in bug77578.phpt (GH-16663)
Avoid dl() in bug77578.phpt

`dl()` has known issues regarding permanent strings[1], so we better
avoid it, even if that means that we need to spawn two sub-processes.

[1] <https://github.com/php/php-src/issues/9196>
2024-11-01 22:13:02 +01:00
Niels Dossche
aafcf997f9 Use spl_RecursiveIteratorIterator_free_iterators() 2024-11-01 20:46:29 +01:00