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

139663 Commits

Author SHA1 Message Date
Niels Dossche
c620fee404 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-18417: Windows SHM reattachment fails when increasing memory_consumption or jit_buffer_size
2025-04-28 19:52:22 +02:00
Niels Dossche
7869af6fa8 Fix GH-18417: Windows SHM reattachment fails when increasing memory_consumption or jit_buffer_size
When a first PHP process launches, Opcache creates a shared file mapping
to use as a shm region. The size of this mapping is set by
opcache.memory_consumption.
When a new PHP process launches while the old one is still running,
Opcache tries to reattach to the shm.
When reattaching it tries to map the requested size (i.e. set by
opcache.memory_consumption). However, if the new requested size is
larger than the size used in the original file mapping, then the call
to VirtualProtect() will fail and the new PHP process will fail to
launch.
It's not possible to resize the virtual region on Windows, unless
relying on undocumented APIs like `NtExtendSection` but then we would
sitll need to communicate that to the first process.

This issue is the root cause of Psalm end-to-end tests failing in
GH-18417: Psalm estimates the required memory sizes and relaunches itself
with more memory requested, if its estimate is below the currently allocated
shared memory. This causes a crash on startup and the tests fail.

To solve this, we need to make the mappings unique per requested size.
There are two ideas:
1. Include in zend_system_id. However, this also affects other things
   and may be too overkill.
2. Include it in the filename, this is an easy local change.
   I went with this option.

Closes GH-18443.
2025-04-28 19:51:31 +02:00
Ilija Tovilo
8fe5a443e2 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Use --ignore-platform-req=php+ in community build
2025-04-28 17:11:30 +02:00
Ilija Tovilo
a16b2c5606 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Use --ignore-platform-req=php+ in community build
2025-04-28 17:11:16 +02:00
Ilija Tovilo
25d21f4161 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Use --ignore-platform-req=php+ in community build
2025-04-28 17:10:58 +02:00
Ilija Tovilo
0a42e6fbc5 Use --ignore-platform-req=php+ in community build
--ignore-platform-reqs may accidentally install versions of dependencies
that no longer support the given PHP version. --ignore-platform-req=php+
will only suppress errors for new PHP version but not change behavior
for older versions. Thanks to Tim for the hint.

Also skip the Laravel build for PHP 8.1, which is no longer supported on
Laravel's default branch.
2025-04-28 17:04:54 +02:00
George Wang
c08c5ded1a Merge branch 'PHP-8.3' into PHP-8.4 2025-04-27 12:00:12 -04:00
George Wang
03844d1f51 Update LSAPI version to V8.2 2025-04-27 11:59:40 -04:00
George Wang
39a8e5e041 Merge branch 'PHP-8.3' into PHP-8.4 2025-04-27 11:53:14 -04:00
George Wang
58e5d0c240 Update max size of request headers from 65535 to 256K 2025-04-27 11:52:51 -04:00
George Wang
e961488d98 Update SAPI_LITESPEED_PATH to sapi/litespeed/lsphp 2025-04-27 11:47:35 -04:00
George Wang
c9aba7c7ca Merge branch 'PHP-8.3' into PHP-8.4 2025-04-27 11:46:27 -04:00
George Wang
e4f2e4a99a Update SAPI_LITESPEED_PATH to sapi/litespeed/lsphp 2025-04-27 11:20:32 -04:00
Niels Dossche
173dccb646 Fix IntlDateFormatter::parseToCalendar() reference type system breaks
Closes GH-18440.
2025-04-27 11:33:21 +02:00
Niels Dossche
d00adca199 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  datefmt_parse/datefmt_localtime references type system fixes
  Fix GH-18438: Handling of empty data and errors in ZipArchive::addPattern
2025-04-27 11:32:57 +02:00
Niels Dossche
2beec54e47 datefmt_parse/datefmt_localtime references type system fixes
Closes GH-18441.
2025-04-27 11:31:35 +02:00
Niels Dossche
2eb3100dca Fix GH-18438: Handling of empty data and errors in ZipArchive::addPattern
There is a ZPP arginfo violation because the empty return or error
return is not always properly handled.
And there is also a memory leak if creating the regular expression
instance fails.

Closes GH-18438.
2025-04-27 11:30:57 +02:00
Niels Dossche
5b8db66227 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-18431: Registering ZIP progress callback twice doesn't work
2025-04-26 14:23:54 +02:00
Niels Dossche
b066ac0b23 Fix GH-18431: Registering ZIP progress callback twice doesn't work
Libzip already cleans up the previous callback, so when that means:
1. The callback zval being already copied over the previous one causes
   libzip to clean up the new callback object. This is the root cause.
2. Our own code to clean the old callback is redundant.

Closes GH-18432.
2025-04-26 14:21:03 +02:00
Niels Dossche
7a2bef02c0 Fix GH-18400: http_build_query type error is inaccurate
Objects are also accepted still, so the error message is misleading.

Closes GH-18434.
2025-04-26 14:17:24 +02:00
Niels Dossche
4ff41cfb4b Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-18421: Integer overflow with large numbers in LimitIterator
2025-04-25 20:06:18 +02:00
Niels Dossche
a91d913901 Fix GH-18421: Integer overflow with large numbers in LimitIterator
Since we already know that `pos < intern->u.limit.offset` at this point,
we can reverse the expression.

Closes GH-18424.
2025-04-25 20:05:55 +02:00
Niels Dossche
c6ed104e91 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-17403: Potential deadlock when putenv fails
2025-04-24 20:22:30 +02:00
Niels Dossche
32e091260a Fix GH-17403: Potential deadlock when putenv fails
Closes GH-18368.
2025-04-24 20:22:04 +02:00
Ilija Tovilo
303610154b Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Increase tolerance for cve-2014-3538 tests
2025-04-24 11:27:32 +02:00
Ilija Tovilo
438f07c9f7 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Increase tolerance for cve-2014-3538 tests
2025-04-24 11:27:25 +02:00
Ilija Tovilo
86ac21c3cd Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Increase tolerance for cve-2014-3538 tests
2025-04-24 11:27:16 +02:00
Ilija Tovilo
b5081339e9 [skip ci] Increase tolerance for cve-2014-3538 tests
These regularly fail with "Failed, time=1.5x".
2025-04-24 11:26:17 +02:00
Niels Dossche
40894bcc49 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Revert "Port XML_GetCurrentByteIndex to public APIs"
2025-04-23 22:08:10 +02:00
Niels Dossche
54e662c6f5 Revert "Port XML_GetCurrentByteIndex to public APIs"
This reverts commit 8dc799aac7.

Originally, this was going to be deprecated in libxml2 2.14, but this
didn't end up happening in the end, and the replacement function that we
used got deprecated instead. So fix the deprecation warning by reverting
to the original code.

Closes GH-18407.
2025-04-23 22:07:26 +02:00
Niels Dossche
94b58239e8 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix DOM tests for upcoming libxml2 serializer changes
2025-04-23 18:30:00 +02:00
Niels Dossche
d6e70e7053 Fix DOM tests for upcoming libxml2 serializer changes
DOM HTML serializer will be closer compliant to HTML5 in the next
libxml2 version, so the tests need to be adapted.
Ref: https://gitlab.gnome.org/GNOME/libxml2/-/merge_requests/309

Closes GH-18406.
2025-04-23 18:29:44 +02:00
Saki Takamachi
2bba3dc3b5 [skip ci] NEWS for #18317 2025-04-23 18:36:45 +09:00
Ilija Tovilo
f2db594567 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  backporting C++17 detection support for recent icu4c releases.
  Drop tidyp from FreeBSD build
2025-04-23 11:01:40 +02:00
Ilija Tovilo
041abec5b2 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  backporting C++17 detection support for recent icu4c releases.
  Drop tidyp from FreeBSD build
2025-04-23 11:01:31 +02:00
Ilija Tovilo
8e533496b0 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  backporting C++17 detection support for recent icu4c releases.
  Drop tidyp from FreeBSD build
2025-04-23 11:01:23 +02:00
David Carlier
3fdd3ed9f7 backporting C++17 detection support for recent icu4c releases. 2025-04-23 11:01:11 +02:00
Ilija Tovilo
35936bfa79 Drop tidyp from FreeBSD build
It looks like it's no longer supported. We don't test tidy on FreeBSD
anyway.
2025-04-23 11:00:24 +02:00
Saki Takamachi
8f8accf9fb Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] NEWS for #18317
2025-04-23 09:31:56 +09:00
Saki Takamachi
c668ed4225 [skip ci] NEWS for #18317 2025-04-23 09:31:10 +09:00
Tim Düsterhus
d5717d25cd Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  fileinfo: Fix cleanup in ext/fileinfo/tests/cve-2014-1943-mb.phpt (#18397)
2025-04-22 22:25:04 +02:00
Tim Düsterhus
92cec8add5 fileinfo: Fix cleanup in ext/fileinfo/tests/cve-2014-1943-mb.phpt (#18397)
This also removes an accidentally committed file.
2025-04-22 22:24:49 +02:00
Derick Rethans
d54aee5b0c Merge branch 'PHP-8.3' into PHP-8.4 2025-04-22 17:11:15 +01:00
Pierrick Charron
aa7aafa5d9 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  PHP-8.3 is now for PHP 8.3.22-dev
2025-04-22 12:05:31 -04:00
Carlos Buenosvinos
c9f3127ca8 Fix GH-18076: date_sun_info() function returns inaccurate sunrise and sunset times
Closes GH-18317: Avoid double counting the 15 minutes radial correction of the sun
2025-04-22 16:45:57 +01:00
Saki Takamachi
33b977e36b PHP-8.4 is now for PHP 8.4.8-dev 2025-04-22 22:23:08 +09:00
Eric Mann
2852177f4d PHP-8.3 is now for PHP 8.3.22-dev 2025-04-22 06:09:24 -07:00
Niels Dossche
4621423e5e Fix uouv in pg_put_copy_end()
Closes GH-18383.
2025-04-21 17:47:37 +02:00
Niels Dossche
29a5adc6af Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix some leaks in php_scandir
2025-04-21 13:21:12 +02:00
Niels Dossche
81d9a27c47 Fix some leaks in php_scandir
Closes GH-18371.
2025-04-21 13:20:45 +02:00