Skip to content

[skip ci] Mark test as XFAIL due to LSAN bug on Clang 14 #12018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions sapi/cli/tests/ext_loading.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Extension loading
--SKIPIF--
<?php
if (getenv('SKIP_ASAN')) {
die('xleak LSAN bug on Clang 14 crashes this test');
}
$extDir = ini_get('extension_dir');
if (!file_exists($extDir . '/opcache.so') && !file_exists($extDir . '/php_opcache.dll')) {
die('skip Opcache shared object not found in extension_dir');
Expand All @@ -10,7 +13,6 @@ if (!file_exists($extDir . '/opcache.so') && !file_exists($extDir . '/php_opcach
--FILE--
<?php


function loadZendExt($extension) {
$cmd = [
PHP_BINARY, '-n',
Expand All @@ -19,7 +21,7 @@ function loadZendExt($extension) {
'-r', 'echo "Done.";'
];
$proc = proc_open($cmd, [['null'], ['pipe', 'w'], ['redirect', 1]], $pipes);
echo "Output: ", stream_get_contents($pipes[1]), "\n";
echo "#####OUTPUT_BEGIN####\n", stream_get_contents($pipes[1]), "\n######OUTPUT_END#####\n";
}

echo "Only extension name:\n";
Expand Down Expand Up @@ -47,19 +49,31 @@ loadZendExt($path);
?>
--EXPECTF--
Only extension name:
Output: Done.
#####OUTPUT_BEGIN####
Done.
######OUTPUT_END#####
Name with file extension:
Output: Done.
#####OUTPUT_BEGIN####
Done.
######OUTPUT_END#####
Absolute path:
Output: Done.
#####OUTPUT_BEGIN####
Done.
######OUTPUT_END#####
Unknown extension name (unknown):
Output:
#####OUTPUT_BEGIN####

Warning: Failed loading Zend extension 'unknown_ext' (tried: %s) in Unknown on line 0
Done.
######OUTPUT_END#####
Name with file extension (unknown):
Output:
#####OUTPUT_BEGIN####

Warning: Failed loading Zend extension '%Sunknown_ext%S' (tried: %s) in Unknown on line 0
Done.
######OUTPUT_END#####
Absolute path (unknown):
Output: Failed loading %s
#####OUTPUT_BEGIN####
Failed loading %s
Done.
######OUTPUT_END#####