1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 18:23:26 +02:00
Commit Graph

124400 Commits

Author SHA1 Message Date
David Carlier 28382aa1ec pcntl: Adding pcntl_rfork support. 2021-05-31 09:19:15 +02:00
David CARLIER 20ef668978 pcntl add darwin specific flags for who/which especially (#7075)
PRIO_DARWIN_BG to be on part with pthread QOS class and
 energy efficiency.
2021-05-31 09:16:46 +02:00
Hao Sun 66826f644d JIT/AArch64: Use D registers for floating-point operations (#7080)
In AArch64, 32 registers, i.e. v0~v31, can be used by the SIMD and
floating-point operations. [1][2]

In PHP the floating-point operations use 64-bit DOUBLE type, and SIMD
operations are not supported currently. Hence we can use D registers
directly.

Note that "ZREG_V*" is kept to denote the register index.

[1]
https://developer.arm.com/documentation/den0024/a/ARMv8-Registers/NEON-and-floating-point-registers/Scalar-register-sizes
[2]
https://github.com/ARM-software/abi-aa/blob/2bcab1e3b22d55170c563c3c7940134089176746/aapcs64/aapcs64.rst#612simd-and-floating-point-registers

Change-Id: I286ce07a49e837b560e3401c742ec91fc561546b
2021-05-31 14:28:33 +08:00
Hao Sun 7c2a3a9400 JIT/AArch64: [macos][ZTS] Support fast path for tlv_get_addr (#7042)
* JIT/AArch64: [macos][ZTS] Support fast path for tlv_get_addr

Access to TLV(thread local variable) in macOS is in "dynamic" form and
function tlv_get_addr() is invoked to resolve the address. See the
example in [1].

Note there is one struct TLVDescriptor [2] for each TLV. The first
member holds the address of function tlv_get_addr(), and the other two
members, "key" and "offset", would be used inside tlv_get_addr().

The disassembly code for function tlv_get_addr() is shown in [3]. With
the value from system register, i.e. tpidrro_el0, together with "key"
and "offset", the TLV address can be obtained.

Note that the value from tpidrro_el0 varies for different threads, and
unique address for TLV is resolved.

It's worth noting that slow path would be executed, i.e. function
tlv_allocate_and_initialize_for_key(), for the first time of TLV access.

In this patch:
1. "_tsrm_ls_cache" is guaranteed to be accessed before any VM/JIT code
during the request startup, e.g. in init_executor(), therefore, slow
path can be avoided.

2. As TLVDecriptor is immutable and zend_jit_setup() executes once, we
get this structure in tsrm_get_ls_cache_tcb_offset(). Note the 'ldr'
instruction would be patched to 'add' by the linker.

3. Only fast path for tlv_get_addr() is implemented in macro
LOAD_TSRM_CACHE.

With this patch, all ~4k test cases can pass for ZTS+CALL in macOS on
Apple silicon.

[1] https://gist.github.com/shqking/4aab67e0105f7c1f2c549d57d5799f94
[2]
https://opensource.apple.com/source/dyld/dyld-195.6/src/threadLocalVariables.c.auto.html
[3] https://gist.github.com/shqking/329d7712c26bad49786ab0a544a4af43

Change-Id: I613e9c37e3ff2ecc3fab0f53f1e48a0246e12ee3
2021-05-31 14:27:00 +08:00
Anatol Belski 805b391d99 NEWS: UPGRADING.INTERNALS: Add PCRE2 10.37 info
[ci skip]

Signed-off-by: Anatol Belski <ab@php.net>
2021-05-30 13:06:16 +02:00
Nikita Popov 8c73dfe062 Remove silly code from openssl_pkey_free() test
W A T
2021-05-29 15:48:58 +02:00
Christoph M. Becker c8244dd989 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix typo in test case (doe → die)
2021-05-29 15:40:15 +02:00
Christoph M. Becker 140eca603c Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix typo in test case (doe → die)
2021-05-29 15:39:17 +02:00
Christoph M. Becker 4ab434fa0e Fix typo in test case (doe → die) 2021-05-29 15:36:40 +02:00
Anatol Belski 79755cad96 pcre2lib: Fix wrong check-in
Signed-off-by: Anatol Belski <ab@php.net>
2021-05-29 15:11:09 +02:00
Anatol Belski 5d4290088e pcre2lib: Pull PCRE2 10.37
Excerpt from the release news:

Version 10.37 26-May-2021
-------------------------

A few more bug fixes and tidies. The only change of real note is the removal of
the actual POSIX names regcomp etc. from the POSIX wrapper library because
these have caused issues for some applications (see 10.33 #2 below).

Version 10.36 04-December-2020
------------------------------

Again, mainly bug fixes and tidies. The only enhancements are the addition of
GNU grep's -m (aka --max-count) option to pcre2grep, and also unifying the
handling of substitution strings for both -O and callouts in pcre2grep, with
the addition of $x{...} and $o{...} to allow for characters whose code points
are greater than 255 in Unicode mode.

NOTE: there is an outstanding issue with JIT support for MacOS on arm64
hardware. For details, please see Bugzilla issue #2618.

Signed-off-by: Anatol Belski <ab@php.net>
2021-05-29 14:52:27 +02:00
Anatol Belski 56c16334e5 ext: Cleanup some dead assignments
Signed-off-by: Anatol Belski <ab@php.net>
2021-05-29 13:03:32 +02:00
Anatol Belski 20fc4fa888 Zend: Cleanup dead assignment in zend_compile_class_const
Signed-off-by: Anatol Belski <ab@php.net>
2021-05-29 13:03:05 +02:00
Nikita Popov ea256a218b Add %0 format to run-tests.php
This format matches against null bytes, and prevents the test
expectation from being interpreted as binary data.

bless_tests.php will automatically replace \0 with %0 as well.
2021-05-29 11:33:13 +02:00
Derick Alangi e838de342a [skip-ci] Improve documentation for better clarity to readers (#7066)
While reading the docs in the repo, I found & made a few improvements
to the documentation so it's clearer to its readers.

These improvements are around: typos, general punctuations, and grammar.
2021-05-29 05:17:51 +01:00
Christoph M. Becker 2454e3b9a5 Merge branch 'PHP-8.0'
* PHP-8.0:
  Speed up ext/dba/tests/bug78808.phpt
2021-05-28 23:25:29 +02:00
Christoph M. Becker af146a42ff Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Speed up ext/dba/tests/bug78808.phpt
2021-05-28 23:24:55 +02:00
Christoph M. Becker c11b52de95 Speed up ext/dba/tests/bug78808.phpt
This tests takes about 2 minutes on AppVeyor CI, what is super slow.
The problem is that we're doing 50,000 inserts of small keys and values
instead of only few inserts with large values, what basically has the
same effect regarding the mmap size.

Closes GH-7073.
2021-05-28 23:24:18 +02:00
Máté Kocsis 04d3a21029 Merge branch 'PHP-8.0'
* Fixed bug #81088 (error in regression test for oci_fetch_object() and oci_fetch_array()
2021-05-28 17:59:57 +02:00
Máté Kocsis a0af84bebd Fixed bug #81088 error in regression test for oci_fetch_object() and oci_fetch_array()
Closes GH-7072
2021-05-28 17:56:51 +02:00
Máté Kocsis 48981f4f1e Declare tentative return types for ext/standard (#7065) 2021-05-28 15:46:04 +02:00
Máté Kocsis 0b01d589f1 Declare tentative return types for ext/oci8 (#7070) 2021-05-28 15:39:53 +02:00
Máté Kocsis 83916e83b4 Declare tentative return types for ext/phar (#7052) 2021-05-28 15:07:15 +02:00
Máté Kocsis dd83ced6bd Declare tentative return types for ext/snmp
Closes GH-7064
2021-05-28 12:45:33 +02:00
Máté Kocsis 5e8bdafae4 Merge branch 'PHP-8.0'
* Fix the return types in ext/snmp (#7068)
2021-05-28 12:44:15 +02:00
Máté Kocsis 15ec7404f1 Fix the return types in ext/snmp (#7068) 2021-05-28 12:34:46 +02:00
twosee 2389ac229f Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix argument index in stream_select()
2021-05-28 17:41:52 +08:00
twosee b751c24e23 Fix argument index in stream_select()
Closes GH-7067.
2021-05-28 17:37:51 +08:00
Máté Kocsis 787db3af48 Declare tentative return types for ext/session (#7005) 2021-05-28 10:29:08 +02:00
Nikita Popov 100a1e8e21 Convert exception during inheritance to fatal error
Now that inheritance can throw deprecations again, these may be
converted to exception by a custom error handler. In this case
we need to convert the exception to a fatal error, as inheritance
cannot safely throw in the general case.
2021-05-28 10:19:23 +02:00
Nikita Popov 6e477d205e Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix session test
2021-05-28 09:45:21 +02:00
Nikita Popov ddb550f1f8 Fix session test 2021-05-28 09:45:06 +02:00
twosee 7e11b4d325 Improve memory allocation related code in zend_fibers (#7058)
- make_fcontext() never returns NULL.
- Show syscall error info in exception just like zend_alloc does (we also used php_win32_error_*() in Zend).
- MAP_ANON was marked as deprecated or compatibility macro on Linux, It would be better to use MAP_ANONYMOUS first.
- Makes the code consistent with the code of other modules in the kernel.
- adds some comments.
2021-05-28 12:04:44 +08:00
Máté Kocsis 29642623fd Promote "Session is not active" warning to exception
In normal circumstances, the session handler methods are not invoked when the session is not active.

Closes GH-7006
2021-05-27 23:26:15 +02:00
Máté Kocsis 53b5105edd Merge branch 'PHP-8.0'
* Fix session cleanup
* Fix the return type of SessionHandler::gc()
2021-05-27 23:08:27 +02:00
Máté Kocsis 6fb08f4607 Fix return type of SessionHandler::gc()
Relates to GH-7006
2021-05-27 23:07:27 +02:00
Máté Kocsis b165197f0f Fix session cleanup 2021-05-27 23:03:19 +02:00
Nikita Popov 010d6a491c Convert SKIPIF -> EXTENSIONS in new opcache test 2021-05-27 16:33:30 +02:00
Nikita Popov ba9c0b38cb Export zend_unary_op_produces_error() and use in optimizer
Don't repeat this logic, as it's going to become more complex.
2021-05-27 16:33:30 +02:00
Máté Kocsis 0224cc83fc Merge branch 'PHP-8.0'
* Add a few missing RETURN_THROWS();
* Fix a few ext/phar return types
2021-05-27 16:32:16 +02:00
Máté Kocsis 9bba9f68df Fix a few ext/phar return types 2021-05-27 16:31:18 +02:00
Máté Kocsis 2d47447d66 Add a few missing RETURN_THROWS();
Only PharFileInfo::compress() really needs it though.
2021-05-27 16:31:18 +02:00
Nikita Popov 853e681267 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #80761
2021-05-27 16:00:23 +02:00
Nikita Popov 635303aec5 Fixed bug #80761
When row data split across multiple packets, allocate a temporary
buffer that can be reallocated, and only copy into the row buffer
pool arena once we know the final size. This avoids quadratic
memory usage for very large results.

(cherry picked from commit 1fc4c89214)
2021-05-27 16:00:03 +02:00
Nikita Popov 92dfd97315 Use early return in snmp
This avoids the odd dangling elses.
2021-05-27 15:03:59 +02:00
Remi Collet 2237102b74 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix snmp build without DES
2021-05-27 14:59:51 +02:00
Remi Collet f9fd3595ec Fix snmp build without DES 2021-05-27 14:58:07 +02:00
Nikita Popov 265dd19d63 Generate tokenizer_data.c from zend_language_parser.y
The order of the tokens in zend_language_parser.h depends on the
used bison version. To avoid spurious changes to tokenizer_data.c
generate tit from the zend_language_parser.y file instead.
2021-05-27 14:35:05 +02:00
Dmitry Stogov a50a1b643e Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #81051 (Broken property type handling after incrementing reference)
2021-05-27 15:23:20 +03:00
Dmitry Stogov ac65f6af6e Fixed bug #81051 (Broken property type handling after incrementing reference) 2021-05-27 15:22:34 +03:00