Skip to content

Commit

Permalink
Skip dl() tests on ASAN
Browse files Browse the repository at this point in the history
  • Loading branch information
iluuu1994 committed Aug 30, 2023
1 parent f2c16b7 commit fb0f421
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ext/dl_test/tests/skip.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
4 changes: 4 additions & 0 deletions ext/opcache/tests/bug68104.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ opcache.enable_cli=1
disable_functions=dl
--EXTENSIONS--
opcache
--SKIPIF--
<?php
if (getenv('SKIP_ASAN')) die('xleak dl() crashes LSan');
?>
--FILE--
<?php
var_dump(is_callable("dl"));
Expand Down
1 change: 1 addition & 0 deletions ext/standard/tests/general_functions/dl-check-enabled.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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=0
Expand Down
1 change: 1 addition & 0 deletions ext/standard/tests/general_functions/dl-cve-2007-4887.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fb0f421

Please sign in to comment.