Add test for GH-10405

This commit is contained in:
Arnaud Le Blanc 2023-01-28 11:49:14 +01:00
parent dc6fbec037
commit 306a72add4
2 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,2 @@
<?php
print "included\n";

View File

@ -0,0 +1,26 @@
--TEST--
GH-10405 (Missing zend_shared_alloc_unlock)
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.optimization_level=-1
opcache.preload={PWD}/preload_user.inc
opcache.preload_user={ENV:TEST_NON_ROOT_USER}
opcache.log_verbosity_level=2
--EXTENSIONS--
opcache
posix
--SKIPIF--
<?php
if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows');
if (posix_geteuid() !== 0) die('skip Test needs root user');
?>
--FILE--
<?php
require __DIR__ . '/gh10405.inc';
?>
OK
--EXPECTF--
bool(false)
included
OK