mirror of
https://github.com/php/php-src.git
synced 2024-12-04 15:23:44 +08:00
59c3ddab13
Due to ASLR restrictions, preloading on Windows does not work with any code that has preloading dependencies on internal classes. This effectively makes it unusable for any non-trivial codebase. Instead of pretending like preloading is going to work, only to make people realize that it really doesn't once they get beyond a dummy example, we disable support for preloading on Windows entirely. Closes GH-4999.
21 lines
462 B
PHP
21 lines
462 B
PHP
--TEST--
|
|
Bug #78761 (Zend memory heap corruption with preload and casting)
|
|
--SKIPIF--
|
|
<?php
|
|
require_once('skipif.inc');
|
|
if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows');
|
|
?>
|
|
--INI--
|
|
opcache.enable_cli=1
|
|
opcache.preload={PWD}/bug78761_preload.php
|
|
--FILE--
|
|
<?php
|
|
try {
|
|
FFI::cast('char[10]', FFI::new('char[1]'));
|
|
} catch (FFI\Exception $ex) {
|
|
echo $ex->getMessage(), PHP_EOL;
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
attempt to cast to larger type
|