Skip to content

Commit 4cd6ff2

Browse files
committed
Debug Windows
1 parent ee80c49 commit 4cd6ff2

File tree

4 files changed

+3
-244
lines changed

4 files changed

+3
-244
lines changed

.github/actions/setup-windows/action.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/scripts/windows/build_task.bat

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ if "%PLATFORM%" == "x86" (
4141
cmd /c configure.bat ^
4242
--enable-snapshot-build ^
4343
--disable-debug-pack ^
44-
--enable-com-dotnet=shared ^
4544
--without-analyzer ^
4645
--enable-object-out-dir=%PHP_BUILD_OBJ_DIR% ^
4746
--with-php-build=%DEPS_DIR% ^

.github/workflows/push.yml

Lines changed: 0 additions & 223 deletions
Original file line numberDiff line numberDiff line change
@@ -42,131 +42,6 @@ env:
4242
CC: ccache gcc
4343
CXX: ccache g++
4444
jobs:
45-
LINUX_X64:
46-
services:
47-
mysql:
48-
image: mysql:8
49-
env:
50-
MYSQL_DATABASE: test
51-
MYSQL_ROOT_PASSWORD: root
52-
postgres:
53-
image: postgres
54-
env:
55-
POSTGRES_USER: postgres
56-
POSTGRES_PASSWORD: postgres
57-
POSTGRES_DB: test
58-
env:
59-
MYSQL_TEST_HOST: mysql
60-
PDO_MYSQL_TEST_DSN: mysql:host=mysql;dbname=test
61-
PDO_MYSQL_TEST_HOST: mysql
62-
strategy:
63-
fail-fast: false
64-
matrix:
65-
include:
66-
- debug: false
67-
zts: false
68-
asan: false
69-
- debug: true
70-
zts: true
71-
asan: true
72-
name: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || '' }}"
73-
runs-on: ubuntu-22.04
74-
container:
75-
image: ${{ matrix.asan && 'ubuntu:23.04' || null }}
76-
steps:
77-
- name: git checkout
78-
uses: actions/checkout@v4
79-
- name: apt
80-
uses: ./.github/actions/apt-x64
81-
- name: System info
82-
run: |
83-
echo "::group::Show host CPU info"
84-
lscpu
85-
echo "::endgroup::"
86-
echo "::group::Show installed package versions"
87-
dpkg -l
88-
echo "::endgroup::"
89-
- name: Create MSSQL container
90-
if: ${{ !matrix.asan }}
91-
uses: ./.github/actions/setup-mssql
92-
- name: Create Oracle container
93-
if: ${{ !matrix.asan }}
94-
uses: ./.github/actions/setup-oracle
95-
- name: Setup Caddy server
96-
uses: ./.github/actions/setup-caddy
97-
- name: ccache
98-
uses: hendrikmuhs/ccache-action@v1.2
99-
with:
100-
# This duplicates the "job.name" expression above because
101-
# GitHub has no way to query the job name (github.job is the
102-
# job id, not the job name)
103-
key: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || '' }}-${{hashFiles('main/php_version.h')}}"
104-
append-timestamp: false
105-
- name: ./configure
106-
uses: ./.github/actions/configure-x64
107-
with:
108-
configurationParameters: >-
109-
--${{ matrix.debug && 'enable' || 'disable' }}-debug
110-
--${{ matrix.zts && 'enable' || 'disable' }}-zts
111-
${{ matrix.asan && 'CFLAGS="-fsanitize=undefined,address -DZEND_TRACK_ARENA_ALLOC" LDFLAGS="-fsanitize=undefined,address" CC=clang CXX=clang++ --disable-opcache-jit' || '' }}
112-
skipSlow: ${{ matrix.asan }}
113-
- name: make
114-
run: make -j$(/usr/bin/nproc) >/dev/null
115-
- name: make install
116-
uses: ./.github/actions/install-linux
117-
- name: Setup
118-
if: ${{ !matrix.asan }}
119-
uses: ./.github/actions/setup-x64
120-
- name: Test
121-
if: matrix.asan == false
122-
uses: ./.github/actions/test-linux
123-
with:
124-
testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}
125-
- name: Test ${{ matrix.asan && 'OpCache' || 'Tracing JIT' }}
126-
uses: ./.github/actions/test-linux
127-
with:
128-
testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || '' }}_${{ matrix.asan && 'OpCache' || 'Tracing JIT' }}
129-
runTestsParameters: >-
130-
-d zend_extension=opcache.so
131-
-d opcache.enable_cli=1
132-
${{ !matrix.asan && '-d opcache.jit_buffer_size=16M' || '' }}
133-
${{ matrix.asan && '--asan -x' || '' }}
134-
- name: Verify generated files are up to date
135-
if: ${{ !matrix.asan }}
136-
uses: ./.github/actions/verify-generated-files
137-
MACOS_DEBUG_NTS:
138-
runs-on: macos-11
139-
steps:
140-
- name: git checkout
141-
uses: actions/checkout@v4
142-
- name: brew
143-
uses: ./.github/actions/brew
144-
- name: ccache
145-
uses: hendrikmuhs/ccache-action@v1.2
146-
with:
147-
key: "${{github.job}}-${{hashFiles('main/php_version.h')}}"
148-
append-timestamp: false
149-
- name: ./configure
150-
uses: ./.github/actions/configure-macos
151-
with:
152-
configurationParameters: --enable-debug --disable-zts
153-
- name: make
154-
run: |-
155-
export PATH="/usr/local/opt/bison/bin:$PATH"
156-
make -j$(sysctl -n hw.logicalcpu) >/dev/null
157-
- name: make install
158-
run: sudo make install
159-
- name: Test Tracing JIT
160-
uses: ./.github/actions/test-macos
161-
with:
162-
testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Tracing JIT
163-
runTestsParameters: >-
164-
-d zend_extension=opcache.so
165-
-d opcache.enable_cli=1
166-
-d opcache.protect_memory=1
167-
-d opcache.jit_buffer_size=16M
168-
- name: Verify generated files are up to date
169-
uses: ./.github/actions/verify-generated-files
17045
WINDOWS:
17146
name: WINDOWS_X64_ZTS
17247
runs-on: windows-2019
@@ -186,105 +61,7 @@ jobs:
18661
run: git config --global core.autocrlf false && git config --global core.eol lf
18762
- name: git checkout
18863
uses: actions/checkout@v4
189-
- name: Setup
190-
uses: ./.github/actions/setup-windows
19164
- name: Build
19265
run: .github/scripts/windows/build.bat
19366
- name: Test
19467
run: .github/scripts/windows/test.bat
195-
BENCHMARKING:
196-
name: BENCHMARKING
197-
if: github.repository_owner == 'php' || github.event_name == 'pull_request'
198-
runs-on: ubuntu-22.04
199-
steps:
200-
- name: git checkout
201-
uses: actions/checkout@v4
202-
with:
203-
fetch-depth: 0
204-
- name: apt
205-
run: |
206-
set -x
207-
sudo apt-get update
208-
sudo apt-get install \
209-
bison \
210-
libgmp-dev \
211-
libonig-dev \
212-
libsqlite3-dev \
213-
openssl \
214-
re2c \
215-
valgrind
216-
- name: ccache
217-
uses: hendrikmuhs/ccache-action@v1.2
218-
with:
219-
key: "${{github.job}}-${{hashFiles('main/php_version.h')}}"
220-
append-timestamp: false
221-
- name: ./configure
222-
run: |
223-
set -x
224-
./buildconf --force
225-
./configure \
226-
--disable-debug \
227-
--enable-mbstring \
228-
--enable-opcache \
229-
--enable-option-checking=fatal \
230-
--enable-sockets \
231-
--enable-werror \
232-
--prefix=/usr \
233-
--with-config-file-scan-dir=/etc/php.d \
234-
--with-gmp \
235-
--with-mysqli=mysqlnd \
236-
--with-openssl \
237-
--with-pdo-sqlite \
238-
--with-valgrind
239-
- name: make
240-
run: make -j$(/usr/bin/nproc) >/dev/null
241-
- name: make install
242-
run: |
243-
set -x
244-
sudo make install
245-
sudo mkdir -p /etc/php.d
246-
sudo chmod 777 /etc/php.d
247-
echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini
248-
echo zend_extension=opcache.so >> /etc/php.d/opcache.ini
249-
echo opcache.enable=1 >> /etc/php.d/opcache.ini
250-
echo opcache.enable_cli=1 >> /etc/php.d/opcache.ini
251-
- name: Setup
252-
run: |
253-
git config --global user.name "Benchmark"
254-
git config --global user.email "benchmark@php.net"
255-
sudo service mysql start
256-
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS wordpress"
257-
mysql -uroot -proot -e "CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'wordpress'; FLUSH PRIVILEGES;"
258-
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON *.* TO 'wordpress'@'localhost' WITH GRANT OPTION;"
259-
- name: git checkout benchmarking-data
260-
uses: actions/checkout@v4
261-
with:
262-
repository: php/benchmarking-data
263-
ssh-key: ${{ secrets.BENCHMARKING_DATA_DEPLOY_KEY }}
264-
path: benchmark/repos/data
265-
- name: Benchmark
266-
run: php benchmark/benchmark.php true
267-
- name: Store result
268-
if: github.event_name == 'push'
269-
run: |
270-
set -x
271-
cd benchmark/repos/data
272-
git pull --autostash
273-
if [ -e ".git/MERGE_HEAD" ]; then
274-
echo "Merging, can't proceed"
275-
exit 1
276-
fi
277-
git add .
278-
if git diff --cached --quiet; then
279-
exit 0
280-
fi
281-
git commit -m "Add result for ${{ github.repository }}@${{ github.sha }}"
282-
git push
283-
- name: Show diff
284-
if: github.event_name == 'pull_request'
285-
run: |-
286-
set -x
287-
php benchmark/generate_diff.php \
288-
${{ github.sha }} \
289-
$(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.sha }}) \
290-
> $GITHUB_STEP_SUMMARY

ext/standard/tests/streams/bug78883.phpt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ $pipes = [];
1616
$cmd = 'cmd.exe "/c START ^"^" /WAIT ' . getenv('TEST_PHP_EXECUTABLE_ESCAPED') . ' -r ^"var_dump(fgets(STDIN));"';
1717
$proc = proc_open($cmd, $descriptorspec, $pipes);
1818
var_dump($proc);
19+
var_dump(proc_get_status($proc));
1920
$pid = proc_get_status($proc)['pid'];
2021
sleep(3);
2122
$bug_is_present = !proc_get_status($proc)['running'];
@@ -24,8 +25,8 @@ if (!$bug_is_present) {
2425
// thus cmd is still running and we should kill it
2526
shell_exec("taskkill /T /F /PID {$pid} 2>nul");
2627
}
27-
fclose($pipes[0]);
28-
fclose($pipes[1]);
28+
//fclose($pipes[0]);
29+
//fclose($pipes[1]);
2930
proc_close($proc);
3031
var_dump($bug_is_present);
3132
?>

0 commit comments

Comments
 (0)