Skip to content

Commit 2550e82

Browse files
committed
Testing
1 parent 3c9e3af commit 2550e82

File tree

6 files changed

+26
-8
lines changed

6 files changed

+26
-8
lines changed

.github/actions/apt-x64/action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ runs:
66
run: |
77
set -x
88
9+
echo "deb http://ddebs.ubuntu.com $(lsb_release -cs) main restricted universe multiverse
10+
deb http://ddebs.ubuntu.com $(lsb_release -cs)-updates main restricted universe multiverse
11+
deb http://ddebs.ubuntu.com $(lsb_release -cs)-proposed main restricted universe multiverse" | \
12+
sudo tee -a /etc/apt/sources.list.d/ddebs.list
13+
sudo apt-get install ubuntu-dbgsym-keyring
14+
915
sudo apt-get update
1016
sudo apt-get install \
1117
bison \
@@ -45,8 +51,6 @@ runs:
4551
snmp-mibs-downloader \
4652
freetds-dev \
4753
unixodbc-dev \
48-
llvm \
49-
clang \
5054
libc-client-dev \
5155
dovecot-core \
5256
dovecot-pop3d \

.github/actions/configure-x64/action.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,4 @@ runs:
8383
--with-config-file-scan-dir=/etc/php.d \
8484
${{ inputs.skipSlow == 'false' && '--with-pdo-firebird' || '' }} \
8585
${{ inputs.skipSlow == 'false' && '--with-pdo-dblib' || '' }} \
86-
--enable-werror \
8786
${{ inputs.configurationParameters }}

.github/workflows/push.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ jobs:
6666
uses: ./.github/actions/setup-caddy
6767
- name: apt
6868
uses: ./.github/actions/apt-x64
69+
- name: Install LLVM and Clang
70+
uses: KyleMayes/install-llvm-action@v1
71+
with:
72+
version: "16.0"
6973
- name: ccache
7074
uses: hendrikmuhs/[email protected]
7175
with:
@@ -80,7 +84,7 @@ jobs:
8084
configurationParameters: >-
8185
--${{ matrix.debug && 'enable' || 'disable' }}-debug
8286
--${{ matrix.zts && 'enable' || 'disable' }}-zts
83-
${{ matrix.asan && 'CFLAGS="-fsanitize=undefined,address -DZEND_TRACK_ARENA_ALLOC" LDFLAGS="-fsanitize=undefined,address" CC=clang CXX=clang++ --disable-opcache-jit' || '' }}
87+
${{ matrix.asan && 'CFLAGS="-fsanitize=undefined,address -DZEND_TRACK_ARENA_ALLOC -fno-omit-frame-pointer" LDFLAGS="-fsanitize=undefined,address" CC=clang CXX=clang++ --disable-opcache-jit' || '' }}
8488
skipSlow: ${{ matrix.asan }}
8589
- name: make
8690
run: make -j$(/usr/bin/nproc) >/dev/null

Zend/zend_portability.h

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,22 @@ static inline void *zend_dlopen(const char *file, int mode)
178178
# define DL_LOAD(libname) zend_dlopen(libname, PHP_RTLD_MODE | RTLD_GLOBAL)
179179
# endif
180180

181+
static inline void *zend_dlsym(void *__restrict handle, const char *__restrict name)
182+
{
183+
# ifdef __SANITIZE_ADDRESS__
184+
__lsan_disable();
185+
# endif
186+
void *ptr = dlsym(handle, name);
187+
# ifdef __SANITIZE_ADDRESS__
188+
__lsan_enable();
189+
# endif
190+
return ptr;
191+
}
181192
# define DL_UNLOAD dlclose
182193
# if defined(DLSYM_NEEDS_UNDERSCORE)
183-
# define DL_FETCH_SYMBOL(h,s) dlsym((h), "_" s)
194+
# define DL_FETCH_SYMBOL(h,s) zend_dlsym((h), "_" s)
184195
# else
185-
# define DL_FETCH_SYMBOL dlsym
196+
# define DL_FETCH_SYMBOL zend_dlsym
186197
# endif
187198
# define DL_ERROR dlerror
188199
# define DL_HANDLE void *

ext/readline/readline_cli.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ this extension sharedto offer compatibility.
754754
do { \
755755
(cb) = NULL; \
756756
cli_shell_callbacks_t *(*get_callbacks)(void); \
757-
get_callbacks = dlsym(RTLD_DEFAULT, "php_cli_get_shell_callbacks"); \
757+
get_callbacks = DL_FETCH_SYMBOL(RTLD_DEFAULT, "php_cli_get_shell_callbacks"); \
758758
if (get_callbacks) { \
759759
(cb) = get_callbacks(); \
760760
} \

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:use_tls=0';
589+
. ':print_suppressions=0:use_tls=0:fast_unwind_on_malloc=false';
590590
}
591591
break;
592592
case '--repeat':

0 commit comments

Comments
 (0)