Skip to content

Commit b3c9ef1

Browse files
authored
Merge branch 'master' into wrong-param-count
2 parents 029e833 + c463770 commit b3c9ef1

File tree

154 files changed

+10438
-11964
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+10438
-11964
lines changed

.github/actions/verify-generated-files/action.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@ runs:
1313
ext/tokenizer/tokenizer_data_gen.php
1414
build/gen_stub.php -f --generate-optimizer-info --verify
1515
ext/phar/makestub.php
16-
# Use the -a flag for a bug in git 2.46.0, which doesn't consider changed -diff files.
17-
git add . -N && git diff -a --exit-code
16+
.github/scripts/test-directory-unchanged.sh .
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/sh
2+
set -ex
3+
cd "$(dirname "$0")/../../.."
4+
5+
revision=refs/tags/pcre2-10.44
6+
7+
git clone --depth 1 --recurse-submodules --revision="$revision" https://github.com/PCRE2Project/pcre2.git /tmp/php-src-bundled/pcre2
8+
9+
rm -rf ext/pcre/pcre2lib
10+
cp -R /tmp/php-src-bundled/pcre2/src ext/pcre/pcre2lib
11+
12+
cd ext/pcre/pcre2lib
13+
14+
# remove unneeded files
15+
rm config.h.generic
16+
rm pcre2.h.in
17+
rm pcre2_dftables.c
18+
rm pcre2_fuzzsupport.c
19+
rm pcre2_jit_test.c
20+
rm pcre2demo.c
21+
rm pcre2grep.c
22+
rm pcre2posix.c
23+
rm pcre2posix.h
24+
rm pcre2posix_test.c
25+
rm pcre2test.c
26+
27+
# move renamed files
28+
mv pcre2.h.generic pcre2.h
29+
mv pcre2_chartables.c.dist pcre2_chartables.c
30+
31+
# add extra files
32+
git restore config.h # based on config.h.generic but with many changes
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh
2+
set -ex
3+
4+
cd "$(dirname "$0")/../../$1"
5+
6+
# notify git about untracked (except ignored) files
7+
git add -N .
8+
9+
# display overview of changed files
10+
git status .
11+
12+
# display diff of working directory vs HEAD commit and set exit code
13+
git diff -a --exit-code HEAD .
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Verify Bundled Files
2+
3+
on:
4+
push:
5+
paths: &paths
6+
- '.github/scripts/download-bundled/pcre2.sh'
7+
- 'ext/pcre/pcre2lib/**'
8+
pull_request:
9+
paths: *paths
10+
schedule:
11+
- cron: "0 1 * * *"
12+
workflow_dispatch: ~
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
VERIFY_BUNDLED_FILES:
19+
name: Verify Bundled Files
20+
runs-on: ubuntu-24.04
21+
steps:
22+
- name: git checkout
23+
uses: actions/checkout@v5
24+
25+
- name: Detect changed files
26+
uses: dorny/paths-filter@v3
27+
id: changes
28+
with:
29+
base: master
30+
filters: |
31+
pcre2:
32+
- '.github/scripts/download-bundled/pcre2.sh'
33+
- 'ext/pcre/pcre2lib/**'
34+
35+
- name: PCRE2
36+
if: ${{ !cancelled() && (steps.changes.outputs.pcre2 == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }}
37+
run: |
38+
echo "::group::Download"
39+
.github/scripts/download-bundled/pcre2.sh
40+
echo "::endgroup::"
41+
echo "::group::Verify files"
42+
.github/scripts/test-directory-unchanged.sh ext/pcre/pcre2lib
43+
echo "::endgroup::"

UPGRADING

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,8 @@ PHP 8.6 UPGRADE NOTES
125125

126126
- Standard:
127127
. Improved performance of array_fill_keys().
128+
. Improved performance of array_map() with multiple arrays passed.
129+
. Improved performance of array_unshift().
128130
. Improved performance of array_walk().
131+
. Improved performance of intval('+0b...', 2) and intval('0b...', 2).
132+
. Improved performance of str_split().

UPGRADING.INTERNALS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ PHP 8.6 INTERNALS UPGRADE NOTES
4343
pointer.
4444
. The zend_get_call_trampoline_func() API now takes the __call or
4545
__callStatic zend_function* instead of a CE and a boolean argument.
46+
. The zend_set_hash_symbol() API has been removed.
47+
. Added zend_hash_str_lookup().
4648
. The WRONG_PARAM_COUNT and ZEND_WRONG_PARAM_COUNT() macros have been
4749
removed. Call zend_wrong_param_count(); followed by RETURN_THROWS();
4850
instead.

Zend/asm/jump_s390x_sysv_elf_gas.S

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,12 @@
4949
.type jump_fcontext, @function
5050

5151
#define ARG_OFFSET 0
52-
#define GR_OFFSET 16
53-
#define FP_OFFSET 96
54-
#define FPC_OFFSET 160
55-
#define PC_OFFSET 168
56-
#define CONTEXT_SIZE 176
52+
#define GR_OFFSET 16
53+
#define R14_OFFSET 88
54+
#define FP_OFFSET 96
55+
#define FPC_OFFSET 160
56+
#define PC_OFFSET 168
57+
#define CONTEXT_SIZE 176
5758

5859
#define REG_SAVE_AREA_SIZE 160
5960

@@ -131,11 +132,14 @@ jump_fcontext:
131132
ltg %r2,GR_OFFSET(%r15)
132133
jnz use_return_slot
133134

134-
/* We restore a make_fcontext context. Use the function
135-
argument slot in the context we just saved and allocate the
136-
register save area for the target function. */
137-
la %r2,ARG_OFFSET(%r1)
138-
aghi %r15,-REG_SAVE_AREA_SIZE
135+
/* We're restoring a context created by make_fcontext.
136+
This is going to be the argument of the entry point
137+
of the fiber. We're placing it on top of the ABI
138+
defined register save area of the fiber's own stack. */
139+
la %r2,REG_SAVE_AREA_SIZE(%r15)
140+
141+
/* REG_SAVE_AREA_SIZE + sizeof(transfer_t) */
142+
aghi %r15,-(REG_SAVE_AREA_SIZE+16)
139143

140144
use_return_slot:
141145
/* Save the two fields in transfer_t. When calling a

Zend/asm/jump_sparc64_sysv_elf_gas.S

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
*/
77

88
/*
9-
* typedef struct {
10-
* void *handle;
11-
* zend_fiber_transfer *transfer;
12-
* } boost_context_data;
9+
* typedef void* fcontext_t;
1310
*
14-
* boost_context_data jump_fcontext(void *to, zend_fiber_transfer *transfer);
11+
* struct transfer_t {
12+
* fcontext_t fctx;
13+
* void * data;
14+
* };
15+
*
16+
* transfer_t jump_fcontext(fcontext_t const to, void *vp);
1517
*/
1618
#define CC64FSZ 176
1719
#define BIAS 2047

Zend/asm/jump_x86_64_ms_pe_gas.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
.file "jump_x86_64_ms_pe_gas.asm"
9090
.text
9191
.p2align 4,,15
92+
.globl jump_fcontext
9293
.def jump_fcontext; .scl 2; .type 32; .endef
9394
.seh_proc jump_fcontext
9495
jump_fcontext:
@@ -203,3 +204,6 @@ jump_fcontext:
203204
/* indirect jump to context */
204205
jmp *%r10
205206
.seh_endproc
207+
208+
.section .drectve
209+
.ascii " -export:\"jump_fcontext\""

Zend/asm/make_s390x_sysv_elf_gas.S

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@
4949
.type make_fcontext, @function
5050

5151
#define ARG_OFFSET 0
52-
#define GR_OFFSET 16
53-
#define R14_OFFSET 88
54-
#define FP_OFFSET 96
55-
#define FPC_OFFSET 160
56-
#define PC_OFFSET 168
57-
#define CONTEXT_SIZE 176
52+
#define GR_OFFSET 16
53+
#define R14_OFFSET 88
54+
#define FP_OFFSET 96
55+
#define FPC_OFFSET 160
56+
#define PC_OFFSET 168
57+
#define CONTEXT_SIZE 176
5858

5959
/*
6060
@@ -72,7 +72,7 @@ r4 - The address of the context function
7272
make_fcontext:
7373
.machine "z10"
7474
/* Align the stack to an 8 byte boundary. */
75-
nill %r2,0xfff0
75+
nill %r2,0xfff8
7676

7777
/* Allocate stack space for the context. */
7878
aghi %r2,-CONTEXT_SIZE

0 commit comments

Comments
 (0)