--TEST--
Concatenating many small strings should not slowdown allocations
--SKIPIF--
-<?php if (PHP_DEBUG) { die ("skip debug version is slow"); } ?>
+<?php
+if (PHP_DEBUG) { die ("skip debug version is slow"); }
+if (getenv('SKIP_PERF_SENSITIVE')) die("skip performance sensitive test");
+?>
--FILE--
<?php
parameters:
configurationName: MACOS_RELEASE_ZTS
configurationParameters: '--disable-debug --enable-maintainer-zts'
+ - template: azure/job.yml
+ parameters:
+ configurationName: DEBUG_ZTS_ASAN_UBSAN
+ configurationParameters: >-
+ --enable-debug --enable-maintainer-zts
+ CFLAGS='-fsanitize=undefined,address -DZEND_TRACK_ARENA_ALLOC'
+ LDFLAGS='-fsanitize=undefined,address'
+ runTestsParameters: --asan
+ timeoutInMinutes: 120
parameters:
configurationName: ''
configurationParameters: ''
+ runTestsParameters: ''
+ timeoutInMinutes: 60
jobs:
- job: ${{ parameters.configurationName }}
+ timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
pool:
vmImage: 'ubuntu-latest'
steps:
- template: test.yml
parameters:
configurationName: ${{ parameters.configurationName }}
+ runTestsParameters: ${{ parameters.runTestsParameters }}
- template: test.yml
parameters:
configurationName: ${{ parameters.configurationName }}
runTestsName: 'OpCache'
- runTestsParameters: -d zend_extension=opcache.so -d opcache.enable_cli=1
+ runTestsParameters: >-
+ ${{ parameters.runTestsParameters }}
+ -d zend_extension=opcache.so -d opcache.enable_cli=1
--- /dev/null
+leak:acommon::DictInfoList::elements
<?php
if (defined("PHP_DEBUG") && PHP_DEBUG)
die("skip not suitable for debug build");
+if (getenv('SKIP_PERF_SENSITIVE'))
+ die("skip performance sensitive test");
if (!class_exists('finfo'))
die('skip no fileinfo extension');
?>
opcache.memory_consumption=999999999
opcache.log_verbosity_level=-1
--SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php
+require_once('skipif.inc');
+if (getenv('SKIP_ASAN')) die('xfail Startup failure leak');
+?>
--FILE--
<?php
var_dump("Script should fail");
opcache.optimization_level=-1
opcache.preload={PWD}/preload_inheritance_error_ind.inc
--SKIPIF--
-<?php require_once('skipif.inc'); ?>
+<?php
+require_once('skipif.inc');
+if (getenv('SKIP_ASAN')) die('xfail Startup failure leak');
+?>
--FILE--
<?php
echo "Foobar\n";
if (!extension_loaded("posix")) die("skip posix extension not available");
if (!function_exists("pcntl_unshare")) die("skip pcntl_unshare is not available");
if (!defined("CLONE_NEWPID")) die("skip flag unavailable");
+if (getenv("SKIP_ASAN")) die("skip asan chokes on this");
if (posix_getuid() !== 0 &&
(!defined("CLONE_NEWUSER") ||
(pcntl_unshare(CLONE_NEWUSER) == false && pcntl_get_last_error() == PCNTL_EPERM))) {
--TEST--
Bug #72685: Same string is UTF-8 validated repeatedly
+--SKIPIF--
+<?php
+if (getenv('SKIP_PERF_SENSITIVE')) die("skip performance sensitive test");
+?>
--FILE--
<?php
<?php
if (!extension_loaded('pspell')) die('skip');
if (!@pspell_new('en')) die('skip English dictionary is not available');
+if (getenv('SKIP_ASAN')) die('skip pspell leaks memory for invalid dicationaries');
?>
--FILE--
<?php
#PHPTestFest Cesena Italia on 2009-06-20
--INI--
magic_quotes_gpc=1
+--SKIPIF--
+<?php if (getenv('SKIP_ASAN')) die('xfail Startup failure leak'); ?>
--FILE--
<?php
echo "*** Test by calling method or function with deprecated option ***\n";
--TEST--
Bug #33853 (php:function call __autoload with lowercase param)
--SKIPIF--
-<?php if (!extension_loaded('xsl')) die('skip xsl not loaded'); ?>
+<?php
+if (!extension_loaded('xsl')) die('skip xsl not loaded');
+if (getenv('SKIP_ASAN')) die('xfail bailing out across foreign C code');
+?>
--FILE--
<?php
case '--shuffle':
$shuffle = true;
break;
+ case '--asan':
+ $environment['USE_ZEND_ALLOC'] = 0;
+ $environment['USE_TRACKED_ALLOC'] = 1;
+ $environment['SKIP_ASAN'] = 1;
+ $environment['SKIP_PERF_SENSITIVE'] = 1;
+
+ $lsanSuppressions = __DIR__ . '/azure/lsan-suppressions.txt';
+ if (file_exists($lsanSuppressions)) {
+ $environment['LSAN_OPTIONS'] = 'suppressions=' . $lsanSuppressions
+ . ':print_suppressions=0';
+ }
+ break;
//case 'w'
case '-':
// repeat check with full switch
if (getenv('TRAVIS')) {
die("skip Fails intermittently on travis");
}
+
+if (getenv('SKIP_PERF_SENSITIVE')) {
+ die("skip Test may be very slow if PHP is instrumented");
+}
?>
--FILE--
<?php
--SKIPIF--
<?php
include "skipif.inc";
+if (getenv("SKIP_ASAN")) die("skip Often fails on azure with asan for unknown reason");
?>
--FILE--
<?php
if (PHP_INT_SIZE == 4) {
die("xfail There may be flaws in the implementation of watchpoints that cause failures");
}
+if (getenv('SKIP_ASAN')) {
+ die("skip intentionally causes segfaults");
+}
?>
--INI--
opcache.optimization_level=0
if (PHP_INT_SIZE == 4) {
die("xfail There may be flaws in the implementation of watchpoints that cause failures");
}
+if (getenv('SKIP_ASAN')) {
+ die("skip intentionally causes segfaults");
+}
?>
--PHPDBG--
b 6
if (PHP_INT_SIZE == 4) {
die("xfail There may be flaws in the implementation of watchpoints that cause failures");
}
+if (getenv('SKIP_ASAN')) {
+ die("skip intentionally causes segfaults");
+}
?>
--PHPDBG--
b 6
if (PHP_INT_SIZE == 4) {
die("xfail There may be flaws in the implementation of watchpoints that cause failures");
}
+if (getenv('SKIP_ASAN')) {
+ die("skip intentionally causes segfaults");
+}
?>
--INI--
opcache.optimization_level=0
if (PHP_INT_SIZE == 4) {
die("xfail There may be flaws in the implementation of watchpoints that cause failures");
}
+if (getenv('SKIP_ASAN')) {
+ die("skip intentionally causes segfaults");
+}
?>
--PHPDBG--
b 3
if (PHP_INT_SIZE == 4) {
die("xfail There may be flaws in the implementation of watchpoints that cause failures");
}
+if (getenv('SKIP_ASAN')) {
+ die("skip intentionally causes segfaults");
+}
?>
--PHPDBG--
b 4