1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 11:32:11 +02:00
Commit Graph

129127 Commits

Author SHA1 Message Date
Michael Voříšek
fc42098c23 Fix typo in lob_prefetch_ini.phpt test (#9099) 2022-07-22 17:17:03 +01:00
Martin Schröder
0adbf9c2d4 Fix memory leak in fiber constructor by throwing an error (#9098) 2022-07-22 10:47:47 -05:00
Derick Rethans
9dcb0bd1dc Merge remote-tracking branch 'derickr/bug75035-big-year-serialisation' 2022-07-22 15:36:04 +01:00
Derick Rethans
1d0e5eddd5 Add test case for bug #80483/#75035 2022-07-22 15:34:57 +01:00
Derick Rethans
6ae86c2358 Fixed bug #80022: Support ISO 8601 years outside 0000-9999 range better 2022-07-22 15:34:57 +01:00
Derick Rethans
8ea587a305 Import timelib 2022.01 2022-07-22 15:34:57 +01:00
Derick Rethans
b1575f996c Merge branch 'PHP-8.1' 2022-07-22 13:08:11 +01:00
Derick Rethans
0ae9942801 Merge remote-tracking branch 'derickr/timelib-2021-15-sync' into PHP-8.1 2022-07-22 13:07:28 +01:00
Derick Rethans
7831a1cae6 Add test case for GH-8964 2022-07-22 13:06:32 +01:00
Derick Rethans
0d3061d225 Import timelib 2021.15 2022-07-22 13:06:32 +01:00
George Peter Banyard
4457dba1fb Add support for stubs to declare intersection type class properties (#8751) 2022-07-22 13:04:49 +01:00
David CARLIER
77bd39a116 crc32 Aarch64 add crc feature to crc32_aarch64 from clang
Closes #8916.
2022-07-22 12:46:11 +01:00
Máté Kocsis
6ab897c8d3 Declare ext/phar constants in stubs (#9094) 2022-07-22 13:09:23 +02:00
Máté Kocsis
17f3631d95 Declare ext/posix constants in stubs (#9095) 2022-07-22 13:08:58 +02:00
Máté Kocsis
f72d264560 Declare ext/pspell constants in stubs (#9096) 2022-07-22 13:08:44 +02:00
George Peter Banyard
0490f082e9 [run-tests.php] echo call performance optimization 2022-07-22 11:53:46 +01:00
Ayesh Karunaratne
3483a1f170 [run-tests.php] Combine multiple str_replace calls to a single strtr call
Makes the replacement easier to see, neatly aligned, and only takes one function call.
This is safe because none of the combined replacement values contain tokens that would be recursively replaced.

This also improves the readability on how the regular expressions in `EXPECTF` matcher is constructed.

Co-authored-by: Michael Voříšek <mvorisek@mvorisek.cz>
2022-07-22 11:53:46 +01:00
Ayesh Karunaratne
c83a10d8db [run-tests.php] Replace backtick operator string literals with shell_exec() calls
The rationale is that `shell_exec()` is identical to the backtick operator (both of which are disabled when `shell_exec` function is disabled) makes it very clear that it is a shell execution, and eases security audits too.
2022-07-22 11:53:46 +01:00
Ayesh Karunaratne
f958701dad [run-tests.php] Merge multiple unset() calls to a single call 2022-07-22 11:53:46 +01:00
Ayesh Karunaratne
056afc8daf [run-tests.php] Minor optimizations in if blocks by placing simple expressions first 2022-07-22 11:53:46 +01:00
Ayesh Karunaratne
51447fb47d [run-tests.php] Improve non-optimal nested if/elseif/else blocks with happy path optimizations
Simplifies and improves the readability of multiple `if`/`elseif`/`else` blocks by removing them when an earlier branch exists the execution flow by either returning or terminating the script.
2022-07-22 11:53:46 +01:00
Tim Düsterhus
ab5491f505 Fix shift in rand_rangeXX() (#9088)
The previous shifting logic is problematic for two reasons:

1. It invokes undefined behavior when the `->last_generated_size` is at least
as large as the target integer in `result`, because the shift is larger than
the target integer. This was reported in GH-9083.

2. It expands the returned bytes in a big-endian fashion: Earlier bytes are
shifting into the most-significant position. As all the other logic in the
random extension treats byte-strings as little-endian numbers this is
inconsistent.

By fixing the second issue, we can implicitly fix the first one: Instead of
shifting the existing bits by the number of "newly added" bits, we shift the
newly added bits by the number of existing bits. As we stop requesting new bits
once the total_size reached the size of the target integer we can be sure to
never invoke undefined behavior during shifting.

The get_int_user.phpt test was adjusted to verify the little-endian behavior.
It generates a single byte per call and we expect the first byte generated to
appear at the start of the resulting number.

see GH-9056 for a previous fix in the same area.
Fixes GH-9083 which reports the undefined behavior.
Resolves GH-9085 which was an alternative attempt to fix GH-9083.
2022-07-22 10:45:17 +01:00
George Peter Banyard
c8f4801382 Convert client->request.request_uri to zend_string (#9086) 2022-07-22 10:39:13 +01:00
Máté Kocsis
dd00296722 Declare ext/pdo constants in stubs (#9078) 2022-07-22 09:46:47 +02:00
Tim Düsterhus
c5f9b2f292 [ci skip] Fix version of NEWS entry
see 133b9b08da
2022-07-22 09:06:12 +02:00
Go Kudo
133b9b08da Avoid signed integer overflow in php_random_range() (#9066) 2022-07-22 10:57:32 +09:00
Tim Düsterhus
dfbe96489d [ci skip] Add "segmentation fault if user engine throws" to NEWS
see GH-9055
2022-07-21 19:32:01 +02:00
Go Kudo
e4c894984f [ci skip] Update EXTENSIONS and Author(s) in ext/random (#9074)
php.net account is better suited for this cases.
2022-07-21 17:53:32 +02:00
Ilija Tovilo
ec52da150c Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix spl test cleanup
2022-07-21 17:21:38 +02:00
Ilija Tovilo
5c10aa43c2 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix spl test cleanup
2022-07-21 17:21:18 +02:00
Ilija Tovilo
3962f00b01 Fix spl test cleanup 2022-07-21 17:20:30 +02:00
Ilija Tovilo
b5ab0e06b8 Assert all test files are cleaned up in CI (#8977)
Closes GH-8427
2022-07-21 16:06:14 +01:00
Ilija Tovilo
0f7d0a3b2a Merge branch 'PHP-8.1'
* PHP-8.1:
  Re-add MSAN in nightly
2022-07-21 16:51:39 +02:00
Ilija Tovilo
37b351ba94 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Re-add MSAN in nightly
2022-07-21 16:51:17 +02:00
Ilija Tovilo
ad136e6a6d Re-add MSAN in nightly
This was lost when migrating to GitHub actions. I'll move this one to
GitHub as well at a later point.
2022-07-21 16:49:52 +02:00
George Peter Banyard
cd640778f7 [skip ci] Add comment about LMDB env_close function call 2022-07-21 14:48:25 +01:00
George Peter Banyard
11c424c9fb Remove unnecessary include in SPL 2022-07-21 14:46:39 +01:00
George Peter Banyard
f60f6be66b Update NEWS 2022-07-21 14:10:31 +01:00
George Peter Banyard
d0542a6b5c Merge branch 'PHP-8.1'
* PHP-8.1:
  Update NEWS
  Fix memory leak in LMDB driver
2022-07-21 14:10:01 +01:00
George Peter Banyard
6cdfaf97e0 Update NEWS 2022-07-21 14:09:27 +01:00
George Peter Banyard
c7a0439d60 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix memory leak in LMDB driver
2022-07-21 14:08:40 +01:00
Ilija Tovilo
41a5b46e7d Fix RC debug of stub attribute (#9082) 2022-07-21 15:06:04 +02:00
George Peter Banyard
5b83b3a933 Fix memory leak in LMDB driver 2022-07-21 14:05:48 +01:00
Ilija Tovilo
d4a9cc8856 Fix rc info of iterator_to_array (#9080)
This function can now return a copy of the provided array, resulting in
a value of RC != 1.
2022-07-21 15:05:34 +02:00
David Carlier
067a3022f8 Sockets disable zerocopy test on ppc based arch.
Failure reported by alpine maintainers.
Closes #9081.
2022-07-21 13:36:49 +01:00
dixyes
02881a76a8 Port win32/codepage.c codes for windows arm64
Closes GH-7702.
2022-07-21 14:02:25 +02:00
Derick Rethans
1c8e566fb5 Update NEWS 2022-07-21 12:35:13 +01:00
Derick Rethans
a71ebb58e0 Merge branch 'PHP-8.1' 2022-07-21 12:34:52 +01:00
Derick Rethans
3edf93d7ee Update NEWS 2022-07-21 12:34:45 +01:00
Derick Rethans
41694cfe13 Merge branch 'PHP-8.1' 2022-07-21 12:32:40 +01:00