Skip to content

Commit e076ffc

Browse files
Merge pull request #1 from php/master
src updated
2 parents 65472c7 + 3331832 commit e076ffc

File tree

965 files changed

+50814
-20389
lines changed

Some content is hidden

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

965 files changed

+50814
-20389
lines changed

.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ task:
2525
tests_script:
2626
- export SKIP_IO_CAPTURE_TESTS=1
2727
- export CI_NO_IPV6=1
28-
- sapi/cli/php run-tests.php -P -q -j2 -g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP --offline --show-diff --show-slow 1000 --set-timeout 120 -d zend_extension=opcache.so
28+
- sapi/cli/php run-tests.php -P -q -j2 -g FAIL,BORK,LEAK,XLEAK --offline --show-diff --show-slow 1000 --set-timeout 120 -d zend_extension=opcache.so

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ end_of_line = lf
99
charset = utf-8
1010
tab_width = 4
1111

12-
[{*.{awk,bat,c,cpp,d,h,l,re,skl,w32,y},Makefile*}]
12+
[{*.{awk,bat,c,cpp,d,dasc,h,l,re,skl,w32,y},Makefile*}]
1313
indent_size = 4
1414
indent_style = tab
1515

.gdbinit

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,8 @@ define ____print_ht
318318
set $n = $n - 1
319319
end
320320

321-
if $ht->u.v.flags & 4
321+
set $packed = $ht->u.v.flags & 4
322+
if $packed
322323
printf "Packed"
323324
else
324325
printf "Hash"
@@ -329,36 +330,45 @@ define ____print_ht
329330
set $i = 0
330331
set $ind = $ind + 1
331332
while $i < $num
332-
set $p = (Bucket*)($ht->arData + $i)
333+
if $packed
334+
set $val = (zval*)($ht->arPacked + $i)
335+
set $key = (zend_string*)0
336+
set $h = $i
337+
else
338+
set $bucket = (Bucket*)($ht->arData + $i)
339+
set $val = &$bucket->val
340+
set $key = $bucket->key
341+
set $h = $bucket->h
342+
end
333343
set $n = $ind
334-
if $p->val.u1.v.type > 0
344+
if $val->u1.v.type > 0
335345
while $n > 0
336346
printf " "
337347
set $n = $n - 1
338348
end
339349
printf "[%d] ", $i
340-
if $p->key
341-
____print_str $p->key->val $p->key->len
350+
if $key
351+
____print_str $key->val $key->len
342352
printf " => "
343353
else
344-
printf "%d => ", $p->h
354+
printf "%d => ", $h
345355
end
346356
if $arg1 == 0
347-
printf "%p\n", (zval *)&$p->val
357+
printf "%p\n", $val
348358
end
349359
if $arg1 == 1
350-
set $zval = (zval *)&$p->val
360+
set $zval = $val
351361
____printzv $zval 1
352362
end
353363
if $arg1 == 2
354-
printf "%s\n", (char*)$p->val.value.ptr
364+
printf "%s\n", (char*)$val->value.ptr
355365
end
356366
if $arg1 == 3
357-
set $func = (zend_function*)$p->val.value.ptr
367+
set $func = (zend_function*)$val->value.ptr
358368
printf "\"%s\"\n", $func->common.function_name->val
359369
end
360370
if $arg1 == 4
361-
set $const = (zend_constant *)$p->val.value.ptr
371+
set $const = (zend_constant *)$val->value.ptr
362372
____printzv $const 1
363373
end
364374
end

.github/actions/test-linux/action.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Test
22
inputs:
3+
testArtifacts:
4+
default: null
5+
required: false
36
runTestsParameters:
47
default: ''
58
required: false
@@ -18,10 +21,17 @@ runs:
1821
export PDO_DBLIB_TEST_USER="pdo_test"
1922
export PDO_DBLIB_TEST_PASS="password"
2023
export SKIP_IO_CAPTURE_TESTS=1
24+
export TEST_PHP_JUNIT=junit.out.xml
2125
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
2226
-j$(/usr/bin/nproc) \
23-
-g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP \
27+
-g FAIL,BORK,LEAK,XLEAK \
2428
--offline \
2529
--show-diff \
2630
--show-slow 1000 \
2731
--set-timeout 120
32+
- uses: actions/upload-artifact@v3
33+
if: always() && inputs.testArtifacts != null
34+
with:
35+
name: ${{ github.job }}_${{ inputs.testArtifacts }}
36+
path: ${{ github.workspace }}/junit.out.xml
37+
retention-days: 5

.github/actions/test-macos/action.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Test
22
inputs:
3+
testArtifacts:
4+
default: null
5+
required: false
36
runTestsParameters:
47
default: ''
58
required: false
@@ -11,10 +14,17 @@ runs:
1114
set -x
1215
export SKIP_IO_CAPTURE_TESTS=1
1316
export CI_NO_IPV6=1
17+
export TEST_PHP_JUNIT=junit.out.xml
1418
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
1519
-j$(sysctl -n hw.ncpu) \
16-
-g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP \
20+
-g FAIL,BORK,LEAK,XLEAK \
1721
--offline \
1822
--show-diff \
1923
--show-slow 1000 \
2024
--set-timeout 120
25+
- uses: actions/upload-artifact@v3
26+
if: always() && inputs.testArtifacts != null
27+
with:
28+
name: ${{ github.job }}_${{ inputs.testArtifacts }}
29+
path: ${{ github.workspace }}/junit.out.xml
30+
retention-days: 5

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ runs:
66
run: |
77
set -x
88
[[ "$OSTYPE" == "darwin"* ]] && export PATH="/usr/local/opt/bison/bin:$PATH"
9+
scripts/dev/credits
910
scripts/dev/genfiles
1011
Zend/zend_vm_gen.php
12+
ext/tokenizer/tokenizer_data_gen.php
1113
build/gen_stub.php -f
1214
build/gen_stub.php --generate-optimizer-info
13-
ext/tokenizer/tokenizer_data_gen.php
14-
git add . -Nu && git diff --exit-code
15+
git add . -N && git diff --exit-code

.github/labeler.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@
146146
"Extension: pspell":
147147
- ext/pspell/**/*
148148

149+
"Extension: random":
150+
- ext/random/**/*
151+
149152
"Extension: readline":
150153
- ext/readline/**/*
151154

@@ -219,22 +222,22 @@
219222
- ext/zlib/**/*
220223

221224
"SAPI: apache2handler":
222-
- ext/sapi/apache2handler/**/*
225+
- sapi/apache2handler/**/*
223226

224227
"SAPI: cgi":
225-
- ext/sapi/cgi/**/*
228+
- sapi/cgi/**/*
226229

227230
"SAPI: cli":
228-
- ext/sapi/cli/**/*
231+
- sapi/cli/**/*
229232

230233
"SAPI: fpm":
231-
- ext/sapi/fpm/**/*
234+
- sapi/fpm/**/*
232235

233236
"SAPI: fuzzer":
234-
- ext/sapi/fuzzer/**/*
237+
- sapi/fuzzer/**/*
235238

236239
"SAPI: litespeed":
237-
- ext/sapi/litespeed/**/*
240+
- sapi/litespeed/**/*
238241

239242
"SAPI: phpdbg":
240-
- ext/sapi/phpdbg/**/*
243+
- sapi/phpdbg/**/*
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Close stale feature requests
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
7+
jobs:
8+
stale:
9+
if: github.repository_owner == 'php'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/stale@v4
13+
with:
14+
days-before-close: 7
15+
days-before-stale: 90
16+
exempt-all-assignees: true
17+
only-issue-labels: "Status: Requires RFC,Feature"
18+
# Hack to skip PRs, unfortunately there's no option to disable PRs
19+
only-pr-labels: inexistent-label
20+
stale-issue-message: >-
21+
There has not been any recent activity in this feature request. It will automatically be closed in 7 days
22+
if no further action is taken. Please see https://github.com/probot/stale#is-closing-stale-issues-really-a-good-idea
23+
to understand why we auto-close stale feature requests.

.github/workflows/nightly.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,13 @@ jobs:
6767
- name: Test
6868
uses: ./.github/actions/test-linux
6969
with:
70+
testArtifacts: ${{ matrix.branch.name }}_${{ matrix.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}
7071
runTestsParameters: >-
7172
${{ matrix.run_tests_parameters }}
7273
- name: Test Tracing JIT
7374
uses: ./.github/actions/test-linux
7475
with:
76+
testArtifacts: ${{ matrix.branch.name }}_${{ matrix.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Tracing JIT
7577
runTestsParameters: >-
7678
${{ matrix.run_tests_parameters }}
7779
-d zend_extension=opcache.so
@@ -80,13 +82,15 @@ jobs:
8082
- name: Test OpCache
8183
uses: ./.github/actions/test-linux
8284
with:
85+
testArtifacts: ${{ matrix.branch.name }}_${{ matrix.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} OpCache
8386
runTestsParameters: >-
8487
${{ matrix.run_tests_parameters }}
8588
-d zend_extension=opcache.so
8689
-d opcache.enable_cli=1
8790
- name: Test Function JIT
8891
uses: ./.github/actions/test-linux
8992
with:
93+
testArtifacts: ${{ matrix.branch.name }}_${{ matrix.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Function JIT
9094
runTestsParameters: >-
9195
${{ matrix.run_tests_parameters }}
9296
-d zend_extension=opcache.so
@@ -127,9 +131,12 @@ jobs:
127131
run: sudo make install
128132
- name: Test
129133
uses: ./.github/actions/test-macos
134+
with:
135+
testArtifacts: ${{ matrix.branch.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}
130136
- name: Test Tracing JIT
131137
uses: ./.github/actions/test-macos
132138
with:
139+
testArtifacts: ${{ matrix.branch.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Tracing JIT
133140
runTestsParameters: >-
134141
-d zend_extension=opcache.so
135142
-d opcache.enable_cli=1
@@ -138,13 +145,15 @@ jobs:
138145
- name: Test OpCache
139146
uses: ./.github/actions/test-macos
140147
with:
148+
testArtifacts: ${{ matrix.branch.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} OpCache
141149
runTestsParameters: >-
142150
-d zend_extension=opcache.so
143151
-d opcache.enable_cli=1
144152
-d opcache.protect_memory=1
145153
- name: Test Function JIT
146154
uses: ./.github/actions/test-macos
147155
with:
156+
testArtifacts: ${{ matrix.branch.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Function JIT
148157
runTestsParameters: >-
149158
-d zend_extension=opcache.so
150159
-d opcache.enable_cli=1
@@ -153,3 +162,34 @@ jobs:
153162
-d opcache.jit=1205
154163
- name: Verify generated files are up to date
155164
uses: ./.github/actions/verify-generated-files
165+
COVERAGE_DEBUG_NTS:
166+
runs-on: ubuntu-20.04
167+
steps:
168+
- name: git checkout
169+
uses: actions/checkout@v2
170+
- name: Create mssql container
171+
uses: ./.github/actions/mssql
172+
- name: apt
173+
uses: ./.github/actions/apt-x64
174+
- name: Install gcovr
175+
run: sudo -H pip install gcovr
176+
- name: ./configure
177+
uses: ./.github/actions/configure-x64
178+
with:
179+
configurationParameters: --enable-debug --disable-zts --enable-gcov
180+
- name: make
181+
run: make -j$(/usr/bin/nproc) >/dev/null
182+
- name: make install
183+
uses: ./.github/actions/install-linux
184+
- name: Setup
185+
uses: ./.github/actions/setup-x64
186+
# We only test with OpCache, the difference in coverage is negligible
187+
- name: Test OpCache
188+
uses: ./.github/actions/test-linux
189+
with:
190+
runTestsParameters: >-
191+
-d zend_extension=opcache.so
192+
-d opcache.enable_cli=1
193+
- name: Upload Test Coverage to Codecov.io
194+
if: always()
195+
run: bash <(curl -s https://codecov.io/bash)

.github/workflows/push.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,12 @@ jobs:
5050
uses: ./.github/actions/setup-x64
5151
- name: Test
5252
uses: ./.github/actions/test-linux
53+
with:
54+
testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}
5355
- name: Test Tracing JIT
5456
uses: ./.github/actions/test-linux
5557
with:
58+
testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Tracing JIT
5659
runTestsParameters: >-
5760
-d zend_extension=opcache.so
5861
-d opcache.enable_cli=1
@@ -78,9 +81,12 @@ jobs:
7881
run: sudo make install
7982
- name: Test
8083
uses: ./.github/actions/test-macos
84+
with:
85+
testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}
8186
- name: Test Tracing JIT
8287
uses: ./.github/actions/test-macos
8388
with:
89+
testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Tracing JIT
8490
runTestsParameters: >-
8591
-d zend_extension=opcache.so
8692
-d opcache.enable_cli=1

0 commit comments

Comments
 (0)