From fb0f4215de04bdd8b8802cb50b5db03a9e80d616 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Wed, 30 Aug 2023 22:20:51 +0200 Subject: [PATCH] Skip dl() tests on ASAN --- ext/dl_test/tests/skip.inc | 4 ++++ ext/opcache/tests/bug68104.phpt | 4 ++++ ext/standard/tests/general_functions/dl-check-enabled.phpt | 1 + ext/standard/tests/general_functions/dl-cve-2007-4887.phpt | 1 + .../tests/general_functions/dl-full-path-not-supported.phpt | 1 + 5 files changed, 11 insertions(+) diff --git a/ext/dl_test/tests/skip.inc b/ext/dl_test/tests/skip.inc index e7558c76350..1149c235d52 100644 --- a/ext/dl_test/tests/skip.inc +++ b/ext/dl_test/tests/skip.inc @@ -12,3 +12,7 @@ if (PHP_OS_FAMILY === 'Windows') { if (!file_exists($path)) { die(sprintf('skip dl_test extension is not built (tried %s)', $path)); } + +if (getenv('SKIP_ASAN')) { + die('xleak dl() crashes LSan'); +} diff --git a/ext/opcache/tests/bug68104.phpt b/ext/opcache/tests/bug68104.phpt index 0726d96a1cd..00c9551e974 100644 --- a/ext/opcache/tests/bug68104.phpt +++ b/ext/opcache/tests/bug68104.phpt @@ -8,6 +8,10 @@ opcache.enable_cli=1 disable_functions=dl --EXTENSIONS-- opcache +--SKIPIF-- + --FILE-- --INI-- enable_dl=0 diff --git a/ext/standard/tests/general_functions/dl-cve-2007-4887.phpt b/ext/standard/tests/general_functions/dl-cve-2007-4887.phpt index effae83464e..d392d41304f 100644 --- a/ext/standard/tests/general_functions/dl-cve-2007-4887.phpt +++ b/ext/standard/tests/general_functions/dl-cve-2007-4887.phpt @@ -6,6 +6,7 @@ $enabled_sapi = array('cgi-fcgi', 'cli', 'embed', 'fpm'); if (!in_array(php_sapi_name(), $enabled_sapi)) { die('skip dl() is not enabled for ' . php_sapi_name()); } +if (getenv('SKIP_ASAN')) die('xleak dl() crashes LSan'); ?> --INI-- enable_dl=1 diff --git a/ext/standard/tests/general_functions/dl-full-path-not-supported.phpt b/ext/standard/tests/general_functions/dl-full-path-not-supported.phpt index aaf7d042e53..2b7ec7dc531 100644 --- a/ext/standard/tests/general_functions/dl-full-path-not-supported.phpt +++ b/ext/standard/tests/general_functions/dl-full-path-not-supported.phpt @@ -9,6 +9,7 @@ $enabled_sapi = array('cgi-fcgi', 'cli', 'embed', 'fpm'); if (!in_array(php_sapi_name(), $enabled_sapi)) { die('skip dl() is not enabled for ' . php_sapi_name()); } +if (getenv('SKIP_ASAN')) die('xleak dl() crashes LSan'); ?> --INI-- enable_dl=1