Skip to content

Commit 1fa9b73

Browse files
committed
[wip] tries ASAN build w/ leak:dlopen suppression
1 parent 093620a commit 1fa9b73

File tree

3 files changed

+158
-157
lines changed

3 files changed

+158
-157
lines changed

.github/lsan-suppressions.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
leak:acommon::DictInfoList::elements
22
leak:timer_create
33
leak:netsnmp_init_mib_internals
4+
lead:dlopen

.github/workflows/push.yml

Lines changed: 156 additions & 156 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ jobs:
4747
fail-fast: false
4848
matrix:
4949
include:
50-
- debug: false
51-
zts: false
52-
asan: false
50+
# - debug: false
51+
# zts: false
52+
# asan: false
5353
- debug: true
5454
zts: true
5555
asan: true
@@ -106,156 +106,156 @@ jobs:
106106
${{ matrix.asan && '--asan -x' || '' }}
107107
- name: Verify generated files are up to date
108108
uses: ./.github/actions/verify-generated-files
109-
MACOS_DEBUG_NTS:
110-
runs-on: macos-11
111-
steps:
112-
- name: git checkout
113-
uses: actions/checkout@v3
114-
- name: brew
115-
uses: ./.github/actions/brew
116-
- name: ccache
117-
uses: hendrikmuhs/[email protected]
118-
with:
119-
key: "${{github.job}}-${{hashFiles('main/php_version.h')}}"
120-
append-timestamp: false
121-
- name: ./configure
122-
uses: ./.github/actions/configure-macos
123-
with:
124-
configurationParameters: --enable-debug --disable-zts
125-
- name: make
126-
run: |-
127-
export PATH="/usr/local/opt/bison/bin:$PATH"
128-
make -j$(sysctl -n hw.logicalcpu) >/dev/null
129-
- name: make install
130-
run: sudo make install
131-
- name: Test Tracing JIT
132-
uses: ./.github/actions/test-macos
133-
with:
134-
testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Tracing JIT
135-
runTestsParameters: >-
136-
-d zend_extension=opcache.so
137-
-d opcache.enable_cli=1
138-
-d opcache.protect_memory=1
139-
-d opcache.jit_buffer_size=16M
140-
- name: Verify generated files are up to date
141-
uses: ./.github/actions/verify-generated-files
142-
WINDOWS:
143-
name: WINDOWS_X64_ZTS
144-
runs-on: windows-2019
145-
env:
146-
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
147-
PHP_BUILD_OBJ_DIR: C:\obj
148-
PHP_BUILD_CACHE_SDK_DIR: C:\build-cache\sdk
149-
PHP_BUILD_SDK_BRANCH: php-sdk-2.2.0
150-
PHP_BUILD_CRT: vs16
151-
PLATFORM: x64
152-
THREAD_SAFE: "1"
153-
INTRINSICS: AVX2
154-
PARALLEL: -j2
155-
OPCACHE: "1"
156-
steps:
157-
- name: git config
158-
run: git config --global core.autocrlf false && git config --global core.eol lf
159-
- name: git checkout
160-
uses: actions/checkout@v3
161-
- name: Setup
162-
uses: ./.github/actions/setup-windows
163-
- name: Build
164-
run: .github/scripts/windows/build.bat
165-
- name: Test
166-
run: .github/scripts/windows/test.bat
167-
BENCHMARKING:
168-
name: BENCHMARKING
169-
if: github.repository_owner == 'php' || github.event_name == 'pull_request'
170-
runs-on: ubuntu-22.04
171-
steps:
172-
- name: git checkout
173-
uses: actions/checkout@v3
174-
with:
175-
fetch-depth: 0
176-
- name: apt
177-
run: |
178-
set -x
179-
sudo apt-get update
180-
sudo apt-get install \
181-
bison \
182-
libgmp-dev \
183-
libonig-dev \
184-
libsqlite3-dev \
185-
openssl \
186-
re2c \
187-
valgrind
188-
- name: ccache
189-
uses: hendrikmuhs/[email protected]
190-
with:
191-
key: "${{github.job}}-${{hashFiles('main/php_version.h')}}"
192-
append-timestamp: false
193-
- name: ./configure
194-
run: |
195-
set -x
196-
./buildconf --force
197-
./configure \
198-
--disable-debug \
199-
--enable-mbstring \
200-
--enable-opcache \
201-
--enable-option-checking=fatal \
202-
--enable-sockets \
203-
--enable-werror \
204-
--prefix=/usr \
205-
--with-config-file-scan-dir=/etc/php.d \
206-
--with-gmp \
207-
--with-mysqli=mysqlnd \
208-
--with-openssl \
209-
--with-pdo-sqlite \
210-
--with-valgrind
211-
- name: make
212-
run: make -j$(/usr/bin/nproc) >/dev/null
213-
- name: make install
214-
run: |
215-
set -x
216-
sudo make install
217-
sudo mkdir -p /etc/php.d
218-
sudo chmod 777 /etc/php.d
219-
echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini
220-
echo zend_extension=opcache.so >> /etc/php.d/opcache.ini
221-
echo opcache.enable=1 >> /etc/php.d/opcache.ini
222-
echo opcache.enable_cli=1 >> /etc/php.d/opcache.ini
223-
- name: Setup
224-
run: |
225-
git config --global user.name "Benchmark"
226-
git config --global user.email "[email protected]"
227-
sudo service mysql start
228-
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS wordpress"
229-
mysql -uroot -proot -e "CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'wordpress'; FLUSH PRIVILEGES;"
230-
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON *.* TO 'wordpress'@'localhost' WITH GRANT OPTION;"
231-
- name: git checkout benchmarking-data
232-
uses: actions/checkout@v3
233-
with:
234-
repository: php/benchmarking-data
235-
ssh-key: ${{ secrets.BENCHMARKING_DATA_DEPLOY_KEY }}
236-
path: benchmark/repos/data
237-
- name: Benchmark
238-
run: php benchmark/benchmark.php true
239-
- name: Store result
240-
if: github.event_name == 'push'
241-
run: |
242-
set -x
243-
cd benchmark/repos/data
244-
git pull --autostash
245-
if [ -e ".git/MERGE_HEAD" ]; then
246-
echo "Merging, can't proceed"
247-
exit 1
248-
fi
249-
git add .
250-
if git diff --cached --quiet; then
251-
exit 0
252-
fi
253-
git commit -m "Add result for ${{ github.repository }}@${{ github.sha }}"
254-
git push
255-
- name: Show diff
256-
if: github.event_name == 'pull_request'
257-
run: |-
258-
php benchmark/generate_diff.php \
259-
${{ github.sha }} \
260-
$(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.sha }}) \
261-
> $GITHUB_STEP_SUMMARY
109+
# MACOS_DEBUG_NTS:
110+
# runs-on: macos-11
111+
# steps:
112+
# - name: git checkout
113+
# uses: actions/checkout@v3
114+
# - name: brew
115+
# uses: ./.github/actions/brew
116+
# - name: ccache
117+
# uses: hendrikmuhs/[email protected]
118+
# with:
119+
# key: "${{github.job}}-${{hashFiles('main/php_version.h')}}"
120+
# append-timestamp: false
121+
# - name: ./configure
122+
# uses: ./.github/actions/configure-macos
123+
# with:
124+
# configurationParameters: --enable-debug --disable-zts
125+
# - name: make
126+
# run: |-
127+
# export PATH="/usr/local/opt/bison/bin:$PATH"
128+
# make -j$(sysctl -n hw.logicalcpu) >/dev/null
129+
# - name: make install
130+
# run: sudo make install
131+
# - name: Test Tracing JIT
132+
# uses: ./.github/actions/test-macos
133+
# with:
134+
# testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Tracing JIT
135+
# runTestsParameters: >-
136+
# -d zend_extension=opcache.so
137+
# -d opcache.enable_cli=1
138+
# -d opcache.protect_memory=1
139+
# -d opcache.jit_buffer_size=16M
140+
# - name: Verify generated files are up to date
141+
# uses: ./.github/actions/verify-generated-files
142+
# WINDOWS:
143+
# name: WINDOWS_X64_ZTS
144+
# runs-on: windows-2019
145+
# env:
146+
# PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
147+
# PHP_BUILD_OBJ_DIR: C:\obj
148+
# PHP_BUILD_CACHE_SDK_DIR: C:\build-cache\sdk
149+
# PHP_BUILD_SDK_BRANCH: php-sdk-2.2.0
150+
# PHP_BUILD_CRT: vs16
151+
# PLATFORM: x64
152+
# THREAD_SAFE: "1"
153+
# INTRINSICS: AVX2
154+
# PARALLEL: -j2
155+
# OPCACHE: "1"
156+
# steps:
157+
# - name: git config
158+
# run: git config --global core.autocrlf false && git config --global core.eol lf
159+
# - name: git checkout
160+
# uses: actions/checkout@v3
161+
# - name: Setup
162+
# uses: ./.github/actions/setup-windows
163+
# - name: Build
164+
# run: .github/scripts/windows/build.bat
165+
# - name: Test
166+
# run: .github/scripts/windows/test.bat
167+
# BENCHMARKING:
168+
# name: BENCHMARKING
169+
# if: github.repository_owner == 'php' || github.event_name == 'pull_request'
170+
# runs-on: ubuntu-22.04
171+
# steps:
172+
# - name: git checkout
173+
# uses: actions/checkout@v3
174+
# with:
175+
# fetch-depth: 0
176+
# - name: apt
177+
# run: |
178+
# set -x
179+
# sudo apt-get update
180+
# sudo apt-get install \
181+
# bison \
182+
# libgmp-dev \
183+
# libonig-dev \
184+
# libsqlite3-dev \
185+
# openssl \
186+
# re2c \
187+
# valgrind
188+
# - name: ccache
189+
# uses: hendrikmuhs/[email protected]
190+
# with:
191+
# key: "${{github.job}}-${{hashFiles('main/php_version.h')}}"
192+
# append-timestamp: false
193+
# - name: ./configure
194+
# run: |
195+
# set -x
196+
# ./buildconf --force
197+
# ./configure \
198+
# --disable-debug \
199+
# --enable-mbstring \
200+
# --enable-opcache \
201+
# --enable-option-checking=fatal \
202+
# --enable-sockets \
203+
# --enable-werror \
204+
# --prefix=/usr \
205+
# --with-config-file-scan-dir=/etc/php.d \
206+
# --with-gmp \
207+
# --with-mysqli=mysqlnd \
208+
# --with-openssl \
209+
# --with-pdo-sqlite \
210+
# --with-valgrind
211+
# - name: make
212+
# run: make -j$(/usr/bin/nproc) >/dev/null
213+
# - name: make install
214+
# run: |
215+
# set -x
216+
# sudo make install
217+
# sudo mkdir -p /etc/php.d
218+
# sudo chmod 777 /etc/php.d
219+
# echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini
220+
# echo zend_extension=opcache.so >> /etc/php.d/opcache.ini
221+
# echo opcache.enable=1 >> /etc/php.d/opcache.ini
222+
# echo opcache.enable_cli=1 >> /etc/php.d/opcache.ini
223+
# - name: Setup
224+
# run: |
225+
# git config --global user.name "Benchmark"
226+
# git config --global user.email "[email protected]"
227+
# sudo service mysql start
228+
# mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS wordpress"
229+
# mysql -uroot -proot -e "CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'wordpress'; FLUSH PRIVILEGES;"
230+
# mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON *.* TO 'wordpress'@'localhost' WITH GRANT OPTION;"
231+
# - name: git checkout benchmarking-data
232+
# uses: actions/checkout@v3
233+
# with:
234+
# repository: php/benchmarking-data
235+
# ssh-key: ${{ secrets.BENCHMARKING_DATA_DEPLOY_KEY }}
236+
# path: benchmark/repos/data
237+
# - name: Benchmark
238+
# run: php benchmark/benchmark.php true
239+
# - name: Store result
240+
# if: github.event_name == 'push'
241+
# run: |
242+
# set -x
243+
# cd benchmark/repos/data
244+
# git pull --autostash
245+
# if [ -e ".git/MERGE_HEAD" ]; then
246+
# echo "Merging, can't proceed"
247+
# exit 1
248+
# fi
249+
# git add .
250+
# if git diff --cached --quiet; then
251+
# exit 0
252+
# fi
253+
# git commit -m "Add result for ${{ github.repository }}@${{ github.sha }}"
254+
# git push
255+
# - name: Show diff
256+
# if: github.event_name == 'pull_request'
257+
# run: |-
258+
# php benchmark/generate_diff.php \
259+
# ${{ github.sha }} \
260+
# $(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.sha }}) \
261+
# > $GITHUB_STEP_SUMMARY

run-tests.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ function main(): void
586586
$lsanSuppressions = __DIR__ . '/.github/lsan-suppressions.txt';
587587
if (file_exists($lsanSuppressions)) {
588588
$environment['LSAN_OPTIONS'] = 'suppressions=' . $lsanSuppressions
589-
. ':print_suppressions=0';
589+
. ':print_suppressions=0:use_tls=0';
590590
}
591591
break;
592592
case '--repeat':

0 commit comments

Comments
 (0)