mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Avoid dl() in run-tests.php (GH-16126)
Prior to running the tests, the test runner checks for all generally available extensions; it does this by scanning the `extension_dir` for files matching the typical extension pattern, but verifies that the file is actually a PHP extension by calling `dl()`. However, `dl()` has known issues[1]. On Windows CI we always get an ugly "zend_mm_heap corrupted" message, and we even can't `dl()` ext/mysql when OPcache is enabled[2]. So we better avoid the double-check with `dl()`, which is unlikely to be necessary anyway. [1] <https://github.com/php/php-src/issues/9196> [2] <https://github.com/php/php-src/issues/8508>
This commit is contained in:
parent
fbfc89944d
commit
3e9f2fa071
2 changed files with 1 additions and 3 deletions
2
.github/scripts/windows/test_task.bat
vendored
2
.github/scripts/windows/test_task.bat
vendored
|
@ -84,8 +84,6 @@ rem set SSLEAY_CONF=
|
||||||
|
|
||||||
rem prepare for OPcache
|
rem prepare for OPcache
|
||||||
if "%OPCACHE%" equ "1" set OPCACHE_OPTS=-d opcache.enable=1 -d opcache.enable_cli=1 -d opcache.protect_memory=1 -d opcache.jit_buffer_size=64M -d opcache.jit=tracing
|
if "%OPCACHE%" equ "1" set OPCACHE_OPTS=-d opcache.enable=1 -d opcache.enable_cli=1 -d opcache.protect_memory=1 -d opcache.jit_buffer_size=64M -d opcache.jit=tracing
|
||||||
rem work-around for failing to dl(mysqli) with OPcache (https://github.com/php/php-src/issues/8508)
|
|
||||||
if "%OPCACHE%" equ "1" set OPCACHE_OPTS=%OPCACHE_OPTS% -d extension=mysqli
|
|
||||||
|
|
||||||
rem prepare for enchant
|
rem prepare for enchant
|
||||||
mkdir %~d0\usr\local\lib\enchant-2
|
mkdir %~d0\usr\local\lib\enchant-2
|
||||||
|
|
|
@ -867,7 +867,7 @@ More .INIs : " , (function_exists(\'php_ini_scanned_files\') ? str_replace("\n"
|
||||||
$ext_dir = ini_get('extension_dir');
|
$ext_dir = ini_get('extension_dir');
|
||||||
foreach (scandir($ext_dir) as $file) {
|
foreach (scandir($ext_dir) as $file) {
|
||||||
if (preg_match('/^(?:php_)?([_a-zA-Z0-9]+)\.(?:so|dll)$/', $file, $matches)) {
|
if (preg_match('/^(?:php_)?([_a-zA-Z0-9]+)\.(?:so|dll)$/', $file, $matches)) {
|
||||||
if (!extension_loaded($matches[1]) && @dl($matches[1])) {
|
if (!extension_loaded($matches[1])) {
|
||||||
$exts[] = $matches[1];
|
$exts[] = $matches[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue