Skip to content

Backport asan push to 81 #151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: PHP-8.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 21 additions & 15 deletions .github/actions/configure-x64/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ inputs:
configurationParameters:
default: ''
required: false
skipSlow:
default: false
required: false
asan:
default: false
required: false
runs:
using: composite
steps:
Expand All @@ -17,9 +23,9 @@ runs:
--enable-fpm \
--with-pdo-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pgsql \
--with-pdo-pgsql \
--with-pdo-sqlite \
${{ inputs.skipSlow == 'false' && '--with-pgsql' || '' }} \
${{ inputs.skipSlow == 'false' && '--with-pdo-pgsql' || '' }} \
${{ inputs.skipSlow == 'false' && '--with-pdo-sqlite' || '' }} \
--enable-intl \
--without-pear \
--enable-gd \
Expand All @@ -34,7 +40,7 @@ runs:
--enable-soap \
--enable-xmlreader \
--with-xsl \
--with-tidy \
${{ inputs.skipSlow == 'false' && '--with-tidy' || '' }} \
--enable-sysvsem \
--enable-sysvshm \
--enable-shmop \
Expand All @@ -51,14 +57,14 @@ runs:
--enable-calendar \
--enable-ftp \
--with-pspell=/usr \
--with-enchant=/usr \
${{ inputs.skipSlow == 'false' && '--with-enchant=/usr' || '' }} \
--with-kerberos \
--enable-sysvmsg \
--with-ffi \
--enable-zend-test \
--enable-dl-test=shared \
--with-ldap \
--with-ldap-sasl \
${{ inputs.skipSlow == 'false' && '--enable-dl-test=shared' || '' }} \
${{ inputs.skipSlow == 'false' && '--with-ldap' || '' }} \
${{ inputs.skipSlow == 'false' && '--with-ldap-sasl' || '' }} \
--with-password-argon2 \
--with-mhash \
--with-sodium \
Expand All @@ -69,16 +75,16 @@ runs:
--with-tcadb \
--with-lmdb \
--with-qdbm \
--with-snmp \
--with-unixODBC \
--with-imap \
--with-imap-ssl \
--with-pdo-odbc=unixODBC,/usr \
${{ inputs.skipSlow == 'false' && '--with-snmp' || '' }} \
${{ inputs.skipSlow == 'false' && '--with-unixODBC' || '' }} \
${{ inputs.skipSlow == 'false' && '--with-imap' || '' }} \
${{ inputs.skipSlow == 'false' && '--with-imap-ssl' || '' }} \
${{ inputs.skipSlow == 'false' && '--with-pdo-odbc=unixODBC,/usr' || '' }} \
$([ -d "/opt/oracle/instantclient" ] && echo '--with-pdo-oci=shared,instantclient,/opt/oracle/instantclient') \
$([ -d "/opt/oracle/instantclient" ] && echo '--with-oci8=shared,instantclient,/opt/oracle/instantclient') \
--with-config-file-path=/etc \
--with-config-file-scan-dir=/etc/php.d \
--with-pdo-firebird \
--with-pdo-dblib \
${{ inputs.skipSlow == 'false' && '--with-pdo-firebird' || '' }} \
${{ inputs.skipSlow == 'false' && '--with-pdo-dblib' || '' }} \
--enable-werror \
${{ inputs.configurationParameters }}
40 changes: 30 additions & 10 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,56 +63,75 @@ jobs:
fail-fast: false
matrix:
include:
# - debug: false
# zts: false
# asan: false
- debug: true
zts: false
- debug: false
zts: true
name: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
asan: true
name: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || '' }}"
runs-on: ubuntu-20.04
steps:
- name: git checkout
uses: actions/checkout@v4
- name: apt
uses: ./.github/actions/apt-x64
- name: System info
run: |
echo "::group::Show host CPU info"
lscpu
echo "::endgroup::"
echo "::group::Show installed package versions"
dpkg -l
echo "::endgroup::"
- name: Create MSSQL container
if: ${{ !matrix.asan }}
uses: ./.github/actions/setup-mssql
- name: Create Oracle container
if: ${{ !matrix.asan }}
uses: ./.github/actions/setup-oracle
- name: Setup Caddy server
uses: ./.github/actions/setup-caddy
- name: apt
uses: ./.github/actions/apt-x64
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
# This duplicates the "job.name" expression above because
# GitHub has no way to query the job name (github.job is the
# job id, not the job name)
key: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}-${{hashFiles('main/php_version.h')}}"
key: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || '' }}-${{hashFiles('main/php_version.h')}}"
append-timestamp: false
save: ${{ github.event_name != 'pull_request' }}
- name: ./configure
uses: ./.github/actions/configure-x64
with:
configurationParameters: >-
--${{ matrix.debug && 'enable' || 'disable' }}-debug
--${{ matrix.zts && 'enable' || 'disable' }}-zts
${{ matrix.asan && 'CFLAGS="-fsanitize=undefined,address -fno-sanitize=function -DZEND_TRACK_ARENA_ALLOC" LDFLAGS="-fsanitize=undefined,address -fno-sanitize=function" CC=clang CXX=clang++ --disable-opcache-jit' || '' }}
skipSlow: ${{ matrix.asan }}
- name: make
run: make -j$(/usr/bin/nproc) >/dev/null
- name: make install
uses: ./.github/actions/install-linux
- name: Setup
if: ${{ !matrix.asan }}
uses: ./.github/actions/setup-x64
- name: Test
if: matrix.asan == false
uses: ./.github/actions/test-linux
- name: Test Tracing JIT
- name: Test ${{ matrix.asan && 'OpCache' || 'Tracing JIT' }}
uses: ./.github/actions/test-linux
with:
jitType: tracing
jitType: ${{ matrix.asan && 'disable' || 'tracing' }}
runTestsParameters: >-
-d zend_extension=opcache.so
-d opcache.enable_cli=1
${{ matrix.asan && '--asan -x' || '' }}
- name: Verify generated files are up to date
if: ${{ !matrix.asan }}
uses: ./.github/actions/verify-generated-files
MACOS_DEBUG_NTS:
if: github.repository == 'php/php-src' || github.event_name == 'pull_request'
if: false
runs-on: macos-13
steps:
- name: git checkout
Expand Down Expand Up @@ -145,7 +164,7 @@ jobs:
- name: Verify generated files are up to date
uses: ./.github/actions/verify-generated-files
WINDOWS:
if: github.repository == 'php/php-src' || github.event_name == 'pull_request'
if: false
name: WINDOWS_X64_ZTS
runs-on: windows-2019
env:
Expand All @@ -171,6 +190,7 @@ jobs:
- name: Test
run: .github/scripts/windows/test.bat
FREEBSD:
if: false
name: FREEBSD
runs-on: ubuntu-latest
steps:
Expand Down
Loading