Skip to content

Commit 732ff70

Browse files
committed
Try asan build
1 parent e6c670f commit 732ff70

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ env:
6868

6969
jobs:
7070
include:
71-
- env: ENABLE_ZTS=1 ENABLE_DEBUG=1 ARM64=1
71+
- env: ENABLE_ZTS=1 ENABLE_DEBUG=1 ENABLE_ASAN=1 ARM64=1
7272
arch: arm64
73-
- env: ENABLE_ZTS=1 ENABLE_DEBUG=1 S390X=1
73+
- env: ENABLE_ZTS=1 ENABLE_DEBUG=1 ENABLE_ASAN=1 S390X=1
7474
arch: s390x
7575

7676
before_script:

travis/compile.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ if [[ "$ENABLE_DEBUG" == 1 ]]; then
1010
else
1111
DEBUG="";
1212
fi
13+
if [[ "$ENABLE_ASAN" == 1 ]]; then
14+
ASAN="--enable-address-sanitizer"
15+
else
16+
ASAN="";
17+
fi
1318
if [[ "$S390X" == 1 ]]; then
1419
S390X_CONFIG="--without-pcre-jit";
1520
else
@@ -23,6 +28,7 @@ fi
2328
$CONFIG_QUIET \
2429
$DEBUG \
2530
$TS \
31+
$ASAN \
2632
$S390X_CONFIG \
2733
--enable-phpdbg \
2834
--enable-fpm \

travis/test.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@ set -ex
44
# ARM64 CI reports nproc=32, which is excessive.
55
if [ -z "$ARM64" ]; then export JOBS=$(nproc); else export JOBS=16; fi
66

7+
if [[ "$ENABLE_ASAN" == 1 ]]; then
8+
ASAN="--asan";
9+
else
10+
ASAN="";
11+
fi
12+
713
export SKIP_IO_CAPTURE_TESTS=1
814
./sapi/cli/php run-tests.php -P \
915
-g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --offline --show-diff --show-slow 1000 \
10-
--set-timeout 120 -j$JOBS \
16+
--set-timeout 120 -j$JOBS $ASAN \
1117
-d extension=`pwd`/modules/zend_test.so \
1218
-d zend_extension=`pwd`/modules/opcache.so \
1319
-d opcache.enable_cli=1 \

0 commit comments

Comments
 (0)